Why redux is required for React Native mobile App?

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Why redux is required for React Native mobile App?



I am experience developer of native android app but I am entry level developer for React Native.



I am familiar with basic but not able to understand why Redux is used with React Native?



I want understanding of Redux feature in respect to Android Native App using java




3 Answers
3



Redux is not "mandatory" in a React Native mobile application. It is just an optional state management library that usually been used in a medium/large React Native application.



Think Redux as a state management over the application. For example, you log in as a user called "Tom". With Redux, you can save the user data into a "store". Then when you want to use it in a profile/account page, you just need to grab the user data from your "store" and display it.



Now imagine if you don't have a Redux. When you want to grab that user data, you either need to call API from database to get the data or you need to pass the user data from login again and again until you reach the profile/account page.



In conclusion, Redux is just a tool that can help you manage your data over the application. It is not required to use Redux in a small application because it can over complicated your application. But, it is suggested to use it when you try to build a medium/large application.





if i store login data or any state data in DB or AsyncStorage then is it fine if i not use redux?
– Rajesh Nasit
17 mins ago





Yeah, I think it is totally fine. Redux just help you manage it better and try to make your code cleaner
– Timothy Alfares
3 mins ago



What is Redux: Redux is state management provide library and its upto you that you want to use or not. but in the complex apps its recommended for use.



Why Use:lets understand with example- You hit a api and get users data and you need it in many screens.Then how will you manage this.



and with Redux once you store data in Redux-state you can access this data anywhere in your app until you refresh your app.



To complete the answer of @Thomithy, it's easy to pass the data from a parent to a child but not the inverse. Redux give the power to React and React/Native to pass the data in all the ways.



However, if the user quit and relaunch the application, you need in your logic to relaunch all the API calls to recover the data.



Good luck !






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

VUfZCN r75kuP0T9
g3Ancrks0moyD8TVER,lq9Ra1IlBKx6S Z Tis9qij3v TDL7 TvniW1pWY3WM4N

Popular posts from this blog

Makefile test if variable is not empty

Visual Studio Code: How to configure includePath for better IntelliSense results

Will Oldham