Closed a-x- closed 6 years ago
Wow Use React16 portals https://hackernoon.com/using-a-react-16-portal-to-do-something-cool-2a2d627b0202?source=linkShare-c20285a847ce-1510861015
Don’t forget about Fall back
Hello, so far your package has done good work for me, but indeed the state is lost. What do you mean exactly by using the portals?
Do I need to wrap a component which I use to portal with
API will be the same,
we'll be using ReactDOM.createPortal
under the hood
Fall back is something like this:
const el = window.document.createElement('div')
// el.id = 'react-easy-print-portal'
window.document.body.appendChild(el)
ReactDOM.render(..., el)
📦 0.7.3-0
Bug: lost every component's state on print
TODO