InterviewSolution
| 1. |
Passing Functions Between Components In React And React Native? |
|
Answer» I would stay away from such passing FUNCTIONS between components. I always use Flux architecture with ReactJs and React Native. Keep components just to render stuff by properties and sending NEW ACTIONS. You have hard dependency between components. This stuff does not SCALE. It will be hard to maintaine such code. What i personally do is just write actions, stores, DISPATCHER and don't use any dependency on stuff like redux, because React Native is envolving rapidly and you never know if your dependencies will do it at same speed. I would stay away from such passing functions between components. I always use Flux architecture with ReactJs and React Native. Keep components just to render stuff by properties and sending new actions. You have hard dependency between components. This stuff does not scale. It will be hard to maintaine such code. What i personally do is just write actions, stores, dispatcher and don't use any dependency on stuff like redux, because React Native is envolving rapidly and you never know if your dependencies will do it at same speed. |
|