'Can I use Redux with MongoDB in one project?
I am started learn NodeJS + MongoDB. Before that, I studied React + Redux. As I understand MongoDB replaces Redux or is it not? If not, what data should be stored in Redux and what data in MongoDB?
Solution 1:[1]
Redux is state management which is used to transfer data between components, But this data is lost when the tab of browser closes or refreshes.
redux-saga can be used to store data in the user's browser, which stores the redux data in the browser's local storage.
But MongoDB is a server-side database for storing data on the server side permanently. To get information in Front-End, a request must be sent to the server using the API and the Back-End data must be sent to the front-end or the user. In general, information including user information and user login information, etc. should be stored in the database.
Solution 2:[2]
Redux is an state manager normally used in React Applications to share the application state globally across component tree. The MongoDB is a NoSQL database manager used to store your application data. i think they are not equivalent.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Arlle Brasil |
