-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Use contextBridge? #45
Comments
good suggestion, i will look into , but feel free to submit a CR and i'll look into it this weekend |
@natew thanks for the suggestion, the library seemed to expose the internal contexts, but there is something wrong with passing values Screen.Recording.2023-09-16.at.13.56.46.mov |
i think i found the issue with the memoized bridge that it returns https://github.com/pmndrs/its-fine/blob/main/src/index.tsx#L221-L233 the equality check does not run a deep equality check which causes the return memoized value to be static and never change. |
I found this library while making a RN modal component. I noticed that its implementation method is very similar to my library react-activation(implements Vue keep alive in React). Due to the movement of the virtual DOM, they both encountered the problem of context discontinuity. The approach of react-activation to this problem is to leave a consumer that listens to the context at the position of transferring the virtual DOM, and transfer all captured context content along with the virtual DOM to the outside. At the position of rendering the virtual DOM, the provider is rebuilt based on the captured context content. This approach seems to have similarities with useContextBridge, hoping it could be of some help to this library. |
Found this: https://github.com/pmndrs/its-fine#usecontextbridge
Think we could make this work with this library to avoid the context clearing issue? I could try out a PR
The text was updated successfully, but these errors were encountered: