React native bidirectional data flow?

泄露秘密 提交于 2021-01-29 05:10:05

问题


I worked with ReactJS and flux. They are to used to build web based applications. And flux is used to enhance the way to data flow providing bidirectional data flow.

I start learning react native and wants to know

─ Can I use flux into react-native ?

OR

─ Is there any other libraries or framework available to use in react native. I came across Redux. Is that only option in react native ?

Please help me to clarify what to use in react native.


回答1:


Yes, you can use Flux in your react native app, but Redux will fit anyway the 99,9% of your cases. Redux is not the only option but is the most used in production so you'll find a lot of examples, not mentioning it is a Flux semplification so if you've worked with Flux maybe you'll get ready very early with Redux. If persistency is not an issue with your app you can just rely on local state patterns.

React Native + Redux: https://blog.cloudboost.io/getting-started-with-react-native-and-redux-6cd4addeb29

React Native + Flux: https://medium.com/react-native-development/writing-a-react-native-tutorial-in-an-age-of-flux-55fb62d5ff7a



来源:https://stackoverflow.com/questions/52816898/react-native-bidirectional-data-flow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!