简体   繁体   中英

Relay Modern with Redux integration

I have reached the case where i have to handle with the client state between react components meaning that i need to pass data from child component to parent(found workaround for neighbouring components).

  1. Do you think Redux implementation with Relay Modern is a match and worth having multiple stores?(or it is a good practice?)
  2. It is a best practice if i update the backend and getting the data back on other react components(Relay query) when it is needed?(this sort of data it is needed only by current user so it is not so relevant to app context)

I want to have a drawer which applies filters globally to all app.

1) Maintainer of Relay says yes https://stackoverflow.com/a/34958818/3739087 (but I would do everything to find a solution without implementing second store)

2) Not sure if I get it right, but you should always request just the data you need. So yes, it is a best practice.

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