SolidJSS
SolidJSโ€ข3y agoโ€ข
4 replies
Mr Void

Warning when modal uses state

I have created a context provider
ModalProvider
that is meant to display a modal whenever it's
visible
state is true. This container is displayed on top of any other element that exists within the
App
.

It worked well, until I created a state within the modal itself - at which point it began throwing the following warning:
computations created outside a `createRoot` or `render` will never be disposed


Why does this happen when
myModal
component is using a state? ( this is displayed in the
ModalProvider
)



https://stackblitz.com/edit/solidjs-templates-bnxz3s?file=src%2FApp.tsx
StackBlitzNedkan
Vite + solid templates
Solidjs - Templates (forked) - StackBlitz
Was this page helpful?