https://github.com/derrickmstrong/reactreduxhooks
React Redux via Hooks
https://github.com/derrickmstrong/reactreduxhooks
bindactioncreators react redux redux-thunk usedispatch useselector
Last synced: about 2 months ago
JSON representation
React Redux via Hooks
- Host: GitHub
- URL: https://github.com/derrickmstrong/reactreduxhooks
- Owner: derrickmstrong
- Created: 2021-09-29T12:00:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-29T12:50:56.000Z (over 4 years ago)
- Last Synced: 2025-03-21T12:57:39.308Z (about 1 year ago)
- Topics: bindactioncreators, react, redux, redux-thunk, usedispatch, useselector
- Language: JavaScript
- Homepage:
- Size: 194 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Redux w/Hooks
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Step by Step
In the project directory, you can run:
### `npx create-react-app .`
Start new CRA project in Terminal
### `Cleanup files`
Once CRA installation is complete, remove default src directory and replace with clean index.js and App.js files
### `npm i redux react-redux redux-thunk`
Install all dependencies
### `Setup store file structure`
###
`store
actions >
index.js
actionTypes >
index.js
reducers >
accountReducer.js
index.js (rootreducer)
index.js (export * as actionCreators from ./actions)
store.js`
###
### `Create action types`
### `Create individual reducers`
### `Combine multiple reducers (rootReducer)`
### `Update store by adding action creators`
### `Create store.js`
### `Apply Redux Thunk middleware to store.js`
### `Wrap store around app with Provider at root index.js`
### `Test/Access state with useSelector`
### `Test/Dispatch action creators with useDispatch and bindActionCreators`
## Congrats! You got yourself a React/Redux app with Hooks.