Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Update to handle changes to redux API #274

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,8 @@ Let's create a file named `src/containers/Hello.tsx` and start off with the foll
import Hello from '../components/Hello';
import * as actions from '../actions/';
import { StoreState } from '../types/index';
import { connect, Dispatch } from 'react-redux';
import { connect } from 'react-redux;
import { Dispatch } from 'redux';
```

The real two key pieces here are the original `Hello` component as well as the `connect` function from react-redux.
Expand Down Expand Up @@ -718,8 +719,9 @@ To put this all together, we need to create a store with an initial state, and s
import { createStore } from 'redux';
import { enthusiasm } from './reducers/index';
import { StoreState } from './types/index';
import { EnthusiasmAction } from './actions/index';\

const store = createStore<StoreState>(enthusiasm, {
const store = createStore<StoreState, EnthusiasmAction, any, any>(enthusiasm, {
enthusiasmLevel: 1,
languageName: 'TypeScript',
});
Expand Down