- run
npm install
- run
npm start
store.ts
- definescreateStore()
which creates a redux store. usesreducer.ts
to import the reducerreducer.ts
- defines all things related to the state and its reducerindex.tsx
- creates a store usingcreateStore()
and passes it to react-redux's component. this connects the whole React app to the redux storeactions.ts
- defines all the action creators that we'd like to use for dispatching actions in React components. we usemapDispatchToProps
and wrap these action creators with adispatch
functionApp.tsx
- this is the main component which you add all your components into
check out components/Counter
to see an example component using redux to read and write to the app state.