Skip to content

serengia/redux-side-effects-method-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redux- Side Effects - Method-2 (Handling Redux Side Effects in using Thunks)

This project demonstrates/shows an example of how to handle Redux-side-effects with redux custom action creators via the use of Thunks.

REMEMBER: Redux-reducers must be pure, i.e. You can't run side effects generating tasks such as making HTTP Requests and saving/fetching staff to your local storage inside redux reducers. To run side-effects generating tasks in redux, you can do that in regular react components(of course using useEffects() hook) or use redux custom action creators via the use of Thunks -- something we are doing in this project.

Running the project

CD into the project directory and run the following command:

npm install

To use the backend, (and if you have time) you can create your own simple API endpoints and replace the HTTP Requests links on this project with your own. Alternatively, you can quickly get a Firebase real-time-database test-link and use that instead.

👤 Author

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Hat tip to anyone who inspired this project

About

This project demonstrates/shows an example of how to handle Redux-side-effects with redux custom action creators via the use of Thunks.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published