-
Notifications
You must be signed in to change notification settings - Fork 47k
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
opaque handle to replace rootNodeId #3932
Comments
See, this is why we break private stuff – to get you all to come and write about the APIs you're missing. :) |
Technically it is still there, just moved a level deeper. Feel free to update the hack. Checkout ReactInstanceHandles. In fact, Relay is even using this hack for this very purpose. It is not perfect though because this ID doesn't contain the full key path. Only the path between rootNodeIDs. We also want to move away from using composite IDs which is expensive. Instead, we'd use a key tree + potentially a counter for event listeners but those are implementation details that we don't want to expose. However, this use case is definitely in scope. We are thinking of a few public APIs to solve similar things:
That's the plan right now in terms of public APIs. Is that plan satisfactory? |
Sorry for the delayed response. These all sound like movement in the right direction to me! |
Closing this out for a broader discussion in #4595 |
Losing this in 0.13.X broke Om applications like CircleCI that used this to maintain an snapshot of their entire application (https://www.youtube.com/watch?v=5yHFTN-_mOo). This permitted full serialization and deserialization of all React app state including transient component local state between browsers (powerful for testing purposes) without forcing programmers to write non-modular code via world passing.
While it's understandable that people might rely on the specifics of the handle, we just need some opaque identifier. We don't care about the actual representation of the handle.
This may well be out of scope. But it would be nice for this issue to get some consideration and official feedback.
The text was updated successfully, but these errors were encountered: