Dynamic Svelte Component State Management
I create a a page in the parent component depending on the incoming properties, the subsidiary components depend on it at varying depths (<a href="https://github.com/ravecat/song/yblob/master/assets/js/components/timer.svelte#L4" target="blank"="relnofollow noopener noreferrer">for example and options outside the context).
What a minute?
Here I am talking not only about dynamic stores, but also about creating a count based on subscriptions.
What does this have to do with my question?
By resolving a similar issue, but with a focus on derivative states still. The overall state I scattered between components using the singleton class, which I recorded in context
I don’t know how this differs from the usual context.
So you can import this class and save types to get the desired status, instead of manually extracting through getContext with type loss and dop checks.
The context is typed from recent versions of the
Why not use it directly?
I use it.
What does not fit the context?
suits, works, only tests turn into the need for a mock getter or import a setter with the creation of envelopes. implementation proceeds into tests, although in the dock something like this as an example are given https://svelte.dev/docs/svelte/context#Component-testing, thought I missed something