-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Library conflicts with libraries that uses useSyncExternalStore
React 18 API
#2263
Comments
@maxsbelt I tried your approach but somehow it did not solve my issue.
Do you maybe have a hint how else to solve it? :) Here is the full error:
|
It was actually the suspense loading issue. I was using It hit me while reading this: reduxjs/react-redux#1977 |
I am having the same issue. I am using Zustand to create a store and attempting to access this store inside my React PDF components to dynamic render its contents. |
My solution for this was to access the Zustand store in the component that renders |
I was using react-redux and NextJS. I had to downgrade to version ^7.0.0 (npm i react-redux@^7.0.0). |
I had the same error when trying nextjs dynamic import too. PDF is huge |
@dev0T and for those using Zustand, you can access your store state (static) outside of React components using the This approach allows you to retrieve the current state without relying on hooks: const someState = useStore.getState().someState; Or destructure: const { firstState, secondState } = useStore.getState(); |
I'm having this issue as well. @react-pdf_renderer.js "TypeError: dispatcher.useSyncExternalStore is not a function" We've been performing some massive build site updates. When we switched from MobX-react-lite v3 => v4, this error started coming up with react-pdf. Not sure of a solution yet. |
Describe the bug
I tried to add
@react-pdf/renderer
library to my project that usesimport "@preact/signals-react"
and received the next error:To Reproduce
@react-pdf/renderer
and@preact/signals-react
dependenciesLink to codesandbox:
https://codesandbox.io/s/heuristic-worker-o55gp4?file=/src/index.js:0-542
Expected behavior
Should work properly
UPDATE:
I was able to solve this problem from my side. My actions:
It still displays an error in the browser console but the PDF view itself works.
The text was updated successfully, but these errors were encountered: