fixing up react-redux for all demo examples

This commit is contained in:
Ken
2019-03-03 09:49:43 -08:00
parent 27bf77b34f
commit 21a61f2450
15 changed files with 179 additions and 72 deletions
@@ -1,7 +1,6 @@
import React from 'react';
import { Stack, Checkbox, IconButton, TextField, DefaultButton } from 'office-ui-fabric-react';
import { actions } from '../actions';
import { StoreContext } from 'redux-react-hook';
import { Store } from '../store';
import { connect } from 'react-redux';
@@ -69,7 +68,7 @@ class TodoListItem extends React.Component<TodoListItemProps, TodoListItemState>
};
private onDoneEdit = () => {
this.context.dispatch(actions.edit(this.props.id, this.state.editLabel));
this.props.edit(this.props.id, this.state.editLabel);
this.setState({
editing: false,
editLabel: undefined