https://github.com/adenugbamichael/blogpost-redux
https://github.com/adenugbamichael/blogpost-redux
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/adenugbamichael/blogpost-redux
- Owner: adenugbamichael
- Created: 2023-04-06T08:17:06.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-04-08T08:02:23.000Z (about 2 years ago)
- Last Synced: 2025-01-24T21:32:11.647Z (4 months ago)
- Language: JavaScript
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# blog-redux
## General Data Loading with Redux
Component gets rendered onto the screen
Component's 'componentDidMount' lifecycle method gets called
We call action creator from 'componentDidMount'
Action creator runs code to make an API request
API responds with data
Action creator returns an 'action' with the fetched data on the 'payload' property
Some reducer sees the action, returns the data off the 'payload'
Some reducer sees the action, returns the data off the 'payload'
Because we generated some new state object, redux/react-redux cause our React app to be rerendered