Repository navigation
How do you use from globally?
#2126
CreativeTechGuy
started this conversation in
General
Replies: 1 comment 5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Playground demo: https://playground.solidjs.com/anonymous/d1477536-d3f1-4ea0-b1fd-b2919db6993d
cleanups created outside a createRoot or render will never be runownerobjectWhat is the correct way to use
fromandobservableso 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
fromonly 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.
All reactions