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?
CodePudding user response:
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 redox 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.
CodePudding user response:
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.