Skip to content
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

[WC-2469] Fix dg2 in modern client #1049

Merged
merged 2 commits into from
May 16, 2024
Merged

[WC-2469] Fix dg2 in modern client #1049

merged 2 commits into from
May 16, 2024

Conversation

r0b1n
Copy link
Collaborator

@r0b1n r0b1n commented Apr 30, 2024

No description provided.

@r0b1n r0b1n requested a review from a team as a code owner April 30, 2024 09:48
@r0b1n r0b1n changed the title WIP: Fix dg2 in modern client [WC-2469] Fix dg2 in modern client Apr 30, 2024
gjulivan
gjulivan previously approved these changes Apr 30, 2024
@iobuhov
Copy link
Collaborator

iobuhov commented Apr 30, 2024

Should we open a PR to mobx-react-lite? We can't always use "dirty hacks" 😄

r0b1n added 2 commits May 15, 2024 10:47
1. Patch mobx to isolate its global store. In modern client setup, calling
config() to isolate is not enough, this happens too late and gives an error.
Hence the fix is to use separate namespace for mobx globals (patch out version).

2. Patch mobx-react-lite to prevent usage of use-sync-external-store shim.
This shim is causing issues with modern client as it uses `require("react")`
which is not processed at this point and fails in runtime.
@gjulivan gjulivan merged commit 9e19953 into main May 16, 2024
14 checks passed
@gjulivan gjulivan deleted the fix/dg2-modern-client branch May 16, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants