generated from chiffre-io/template-library
-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Detect multiple contexts loaded at the same time
- Loading branch information
Showing
4 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Multiple adapter contexts detected | ||
|
||
## Probable cause | ||
|
||
This error occurs in [debug mode](https://nuqs.47ng.com/docs/debugging) in | ||
certain monorepo setups where references of the adapter context aren't the same | ||
in different packages, and cause a [`NUQS-404 - nuqs requires an adapter to work with your framework`](./NUQS-404) error. | ||
|
||
## Root cause | ||
|
||
As described in the [React docs](https://react.dev/reference/react/useContext#my-component-doesnt-see-the-value-from-my-provider), this can happen with Context providers (which | ||
is what adapters are) being re-created in different modules and causing different | ||
references being used for a provider and consumers. | ||
|
||
## Possible solutions | ||
|
||
See issue [#798](https://github.com/47ng/nuqs/issues/798) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters