How do you use from
globally?
#2126
CreativeTechGuy
started this conversation in
General
Replies: 1 comment 5 replies
-
with #1115, option 1 is fine now |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Playground demo: https://playground.solidjs.com/anonymous/d1477536-d3f1-4ea0-b1fd-b2919db6993d
cleanups created outside a createRoot or render will never be run
owner
objectWhat is the correct way to use
from
andobservable
so that it doesn't produce a warning (or whatever problems are indicated by the warning)?It seems like the cleanup function will never run for a global signal anyway, so I cannot find any runtime impact of either option, both would work as expected. And the docs don't say anything about being forced to use
from
only within a component. Is there something I'm missing?Edit: It seems like another way to get an unowned block would be:
Not sure if that is better or worse than just constructing an owner object by hand.
Beta Was this translation helpful? Give feedback.
All reactions