milomg / reactively

MIT License
415 stars 23 forks source link

Context? #20

Closed titoBouzout closed 11 months ago

titoBouzout commented 11 months ago

I'm wondering if there's any way to access some sort of context, for setting and getting values.

milomg commented 11 months ago

If all you need is an easy way to pass reactive variables around, you could create a global variable that stores a reactive signal and use that as a replacement for context.

Reactively doesn't have a more powerful version of context that can change based on ownership (like Solid), because reactively doesn't have ownership. If you're looking for ownership, it is possible that Reactively is too small for your use case, and something like solidjs/signals would be a better fit.

titoBouzout commented 11 months ago

I see, thanks. My main use case is a Router, but context could be used for other things.