As shown in the figure …
All the arrangements are almost perfect. However, the problem arises. I am stuck in how to transfer the title of the material library item to the matchmaking activity component … The matchmaking activity component and the material library component are two peer routers of react-router, that is, peer components. I heard that the communication of peer components can be realized through the nodejs event mechanism, but how? Come here to consult the great gods. . . I didn’t use flux and other architecture modes …
With react-router, these two peer components should be controlled by routing, assuming (forgive my Chinglish, in addition, the following routing is only my yy)
Then the problem translates into: the current route is in the sucai component, click the button
1. switch to the xiangqin component-> change url. . .
2. Pass Parameters-> Take Parameters in url inside. . . You can also find a place to save the data and change the url. . .