Interact component interactions and global state changes

I am very new to React, just experimenting with it. I would like to know what common templates or libraries are o built-in to handle communication between components. For example, I have an input component and a list component that updates from the server according to what is in the input controller. Think of an autocomplete box. Since the components have presentation logic, what if two cannot be “except”? They are located in different parts of the page and, therefore, two different controllers.

Also, what if I have a login / logout button that works through Ajax? I imagine that many different components on the page react to the action of logging in / out of the system, reconfiguring themselves to the global "registered" state and the data received from the server for a specific user who is logged in.

What is the best response to these changes? Thanks

+4
source share
2 answers

Flux Dispatcher. /, /. , , .

+2

, React Facebook. , 90% , , . , - . 20 : https://facebook.imtqy.com/react/tutorial/tutorial.html

, Redux - , . , , - , Redux ( Flux) . - , . : http://redux.js.org/

0

All Articles