diegomura / react-pdf

📄 Create PDF files using React
https://react-pdf.org
MIT License
14.61k stars 1.16k forks source link

React-Redux Provider issue #2431

Open web-shoharab-pk opened 10 months ago

web-shoharab-pk commented 10 months ago

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):

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

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 image

Desktop (please complete the following information):

fabio-carvalho88 commented 4 months ago

Any solution or workaround?

er-santosh commented 4 months ago

@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.

fabio-carvalho88 commented 4 months ago

could you please provide an example? @er-santosh