How to store JSX element in a signal and render it from other elements
I have created a dialog system using context where the dialog that I want to render is stored via a function provided by context and the provider is the one that renders the dialog:
Playground Link: https://playground.solidjs.com/anonymous/5d842f3f-3a3c-49b8-8287-9d46e0d29ca1
This works well but I have two problems. Firstly, I get a warning in the console when I trigger the modal:
And secondly, some components are not rendered when I open the modal. For example, I installed
Playground Link: https://playground.solidjs.com/anonymous/5d842f3f-3a3c-49b8-8287-9d46e0d29ca1
This works well but I have two problems. Firstly, I get a warning in the console when I trigger the modal:
dev.js:836 computations created outside acreateRootorrenderwill never be disposed
And secondly, some components are not rendered when I open the modal. For example, I installed
solid-icons package to render an icon. The icon is not rendered on first open but when I modify the code to trigger hot reload, the icon component is rendered inside it. The icons are rendered fine everywhere else.