How does react communicate with peers through nodejs’s event mechanism module

  node.js, question

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)

Dating: /component/xiangqin
Material: /component/sucai

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. . .