React Native : Redux Easy Way to Start
Really i have big fascination to use Redux to React Native Apps, anyway lets start.
What is Redux ?
Redux is a state management library, and is often used with React Native to simplify data flow within an app. … When we will complete with this article, we will have a better understanding of when (and when not) to use Redux, and we’ll be able to use Redux in your React Native applications.
Purpose
Globally state management entire Apps.
Structure and Data Flow [Flux Architecture]
Data in a Flux application flows in a single direction:
Installation
React Redux 7.x requires React 16.8.3 or later.
To use React Redux with your React app: npm install react-redux
Provider
React Redux provide <Provider /> which makes the Store is available to the rest of your App or entire Apps.
Connect
React Redux provide a connect function to connect our component with store.
Generally we connect our component by following ways
Reducer & Action Types
It initialize action wise new state which actually dispatch from view under a specific action.
Store
How to use this amount entire my apps?
Hope this article saves your time and make your development easy in react native with Redux. If it helps you in anyway, don’t forget to clap! Thanks :)
Thanks to all