Open web-shoharab-pk opened 1 year ago
Any solution or workaround?
@fabio-carvalho88 @web-shoharab-pk @diegomura In my case i had used
const [instance, update] = usePDF({ document });
and i had to wrap the document
with redux provider to get it working.
could you please provide an example? @er-santosh
@web-shoharab-pk The rendering of the pdf is done on a different react root than your react-dom root. Hence you don't have access to the contexts that are on that tree.
You can use the hook useContextBridge
from its-fine
library https://github.com/pmndrs/its-fine?tab=readme-ov-file#usecontextbridge or the react-context-bridge
package to solve your use case.
Describe the bug could not find react-redux context value; please ensure the component is wrapped in a
I called useSelector hook inside of my pdf component and my pdf component use inside my root file. my root file wrapped by redux provider but I face the issue. How can I solve it?
Please help me, Thanks
To Reproduce Steps to reproduce the behavior including code snippet (if applies):
You can make use of react-pdf REPL to share the snippet
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
Desktop (please complete the following information):