mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Mention Flux in “communicate between components”
This commit is contained in:
1 parent
ddbbaa9500
commit
21d91e6f5f
1 file changed
+1
-1
@@ -38,4 +38,4 @@ React.render(
|
||||
|
||||
Notice the use of `bind(this, arg1, arg2, ...)`: we're simply passing more arguments to `handleClick`. This is not a new React concept; it's just JavaScript.
|
||||
|
||||
For communication between two components that don't have a parent-child relationship, you can set up your own global event system. Subscribe to events in `componentDidMount()`, unsubscribe in `componentWillUnmount()`, and call `setState()` when you receive an event.
|
||||
For communication between two components that don't have a parent-child relationship, you can set up your own global event system. Subscribe to events in `componentDidMount()`, unsubscribe in `componentWillUnmount()`, and call `setState()` when you receive an event. [Flux](https://facebook.github.io/flux/) pattern is one of the possible ways to arrange this.
|
||||
Reference in new issue
Block a user