简体   繁体   中英

How to push props to component without any connection and calls? Another page

How to push props to component without any connection and calls? Another page I have profile and company employees structure i wanna do button what will show to users theirs place in structure, but this is two pages without any render and connections or calls like <OrgStructure employeeCode="test"/>

If you have two Components that share common state but can't be directly coupled, you should use a global state container of whom both Components can read from.

You should check out https://react-redux.js.org/ . It provides a global state container called "redux store". Components can independently subscribe to the store and get updated whenever the data in the store changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM