-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow disabling Relay container shouldComponentUpdate? #674
Comments
This seems pretty reasonable. You should open a PR 😄 |
I wanted someone to tell me if it seemed reasonable :p Given facebook/react#2517 (comment), it looks like this will at most just be a temporary workaround – but it might be useful for some months. |
I'd like to pick this up if no one else is currently working on it? I've had a quick stab at it here: peterhorne@3e437df. If that looks alright please let me know and I shall add tests/docs and submit a PR. |
I never started working on this. Your code is roughly what I had in mind. For consistency with e.g. React-Redux containers, it might make sense to make the setting be something like |
I've changed the setting name to |
This is inconvenient timing, but @gaearon has convinced me that Specifically in the context of React Router, we're working on making our context use bypass intervening SCU checks by default, and extracting the utilities into a separate library for use by other context-using libraries: https://github.com/reactjs/react-router/pull/3430/files#diff-933e86e8d3d465b7c3d503e664607d59. It's possible, then, that this is a bit of an anti-feature now, since I'm not aware of any other good reason to disable the Relay container pure render optimizations other than to allow context updates to propagate. |
@taion thanks for the follow-up. We'd be happy to remove the sCU option, we'll probably wait until |
@josephsavona Our current tentative plan is to cut a React Router v3.0.0-pre.0 (or some other prerelease tag) within the next day or two, with the live links. |
@taion @devknoll @josephsavona the current replay container allows user to specify its own implementation of scu. what I'm interested in, is to integrate default SCU with customer provided SCU together. something like this:
there are 2 main changes in above code
Please suggest if the idea makes sense and I can create a PR for it once confirmed. |
I have a few use cases where I have components that receive data via React
context
. The current implementation ofshouldComponentUpdate
on Relay containers blocks updates to those components viacontext
.Would it make sense to allow disabling the optimized
shouldComponentUpdate
as a configuration option forRelay.createContainer
? Right now I have to do something a bit ugly to get the behavior I want.The text was updated successfully, but these errors were encountered: