a-x- / react-easy-print

Powerful react component for easy printing
https://www.npmjs.com/package/react-easy-print
MIT License
87 stars 19 forks source link

Not working in the application where semantic ui is imported #41

Open krajasekhar opened 5 years ago

krajasekhar commented 5 years ago

I am trying to use this module in my project. But it is giving below errors.

  1. React, react-dom modules are missing.
  2. Warning: Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate. Warning: Failed context type: The context printProvider is marked as required in Print, but its value is undefined.

3.Uncaught Invariant Violation: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

https://stackblitz.com/edit/raju-print

a-x- commented 5 years ago

I didn't repro

also, stackblitz does not work for me (¯\_(ツ)_/¯) I moved the example to codesandbox: https://codesandbox.io/s/reacteasyprintissue41-2160b

  1. I looked Problems panel: no errors
  2. I pressed the Print button
  3. I looked Problems again: no error again
eDubrovsky commented 4 years ago

Same issue. @a-x- open your link on codesandbox and change from <Print printOnly> to <Print name='printName'> and you will see this errors in Chrome console:

Warning: Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate. Check the render method of r.