Closed alanhigg closed 1 year ago
Hello--this warning is intentional, but you can ignore it if you understand that any changes to the prop will not affect the signal. Or, you can rename the prop to initialCount
or defaultCount
which will silence the warning. See my answer here.
I've encountered an issue where the solid/reactivity is warning about a reactive variable being used outside of a tracked scope and I can't seem to identify the reason for the warning. After some exploration It seems like perhaps it is a false-positive.
The point of failure is inside a Context that I've built for my application but the same behaviour is exposed when using the reference implementation for using Context Providers from the official SolidJS tutorial, here: https://www.solidjs.com/tutorial/stores_context?solved
The context module from the tutorial:
The linter warning is the following:
The reference example uses the context in the main application like this:
Any insight you may have about this problem would be appreciated. Thanks!