Open FreddyMartinez opened 1 year ago
Hi! nice library, but I'd like to ask for help solving an issue with React 18 and createPortal.
When using KeepAlive inside portals, the component wrapped by KeepAlive is frozen, ie it is rendered but it is not possible to interact with it.
I've made a PoC in this sandbox. This problem only happens using React 18, the same code using React 16 works fine (here a sandbox).
I appreciate any help you can provide on this. Greetings.
For reference, this works on React16 but doesn't on React17/18:
const Portal = createPortal(children, target) const usage = <AliveScope> <Portal> <Counter /> </Portal> </AliveScope>
Hi! nice library, but I'd like to ask for help solving an issue with React 18 and createPortal.
Current Behaviour:
When using KeepAlive inside portals, the component wrapped by KeepAlive is frozen, ie it is rendered but it is not possible to interact with it.
I've made a PoC in this sandbox. This problem only happens using React 18, the same code using React 16 works fine (here a sandbox).
I appreciate any help you can provide on this. Greetings.