-
-
Notifications
You must be signed in to change notification settings - Fork 137
infinite loops still possible despite prop checks #87
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
Comments
Yeah, there's some brittleness here for sure. Can you provide a bit more context about what's failing in your app? |
@nicolaskruchten I'm using the example code more or less as written, but with a big custom this causes |
Yeah, the subtlety there is that in the example code, the value of the prop is always the same: it's a lookup in This is documented here but clearly I wrote that section more in a "here's how to trigger an update" and not "here's how to avoid triggering an update" manner, and I should make it clearer. |
ah yes, I should have noticed this, thanks. it's working as expected now (once I jammed the |
Let me find a sec to update the readme to call this out specifically and maybe you can give me some feedback on the phrasing to see if it would have helped you avoid this issue? |
OK so this isn't going to be a one-liner in the documentation after all... Closing in favour of #88. Thanks for the nudge to clear up this documentation weirdness, and sorry you had to encounter this problem before I realized we were leading everyone astray like this! |
the
README
example code foronUpdate
hangs when transplanted into my project. the reason being simply that in general{a:1} === {a:1}
evaluates tofalse
. It looks like a good option would be to extirpate these fudged "shouldUpdate?" conditions fromcomponentWillUpdate
altogether and changePlotlyComponent
to aPureComponent
. Verbatim this doesn't quite do the trick: I think.then(() => this.figureCallback(nextProps.onUpdate))
needs to go somewhere else too, but I haven't figured it out.related #77
The text was updated successfully, but these errors were encountered: