Warning computations created outside a `createRoot`....
I have a code like this.
Wrapping store using createRoot doesn't solve this.
'createEffect' actually makes the warning.
How to solve it?

5 Replies
You need to put the wrapper outside both store and effect.
Hmm.. So whenever I add new createEffect, Do I always have to wrap createRoot? I have a lot of createEffect....
Just have one createRoot around all of your external state and effects.
Like
export const { ... } = createRoot(() => { return { ... } })
Thanks alex. Like this?

That should work.