Per Svelte docs, effects rerun only when the object changes, not its properties.
Is there a better way than snapshots to handle cases where manually listing multiple properties like `mapFilters.showRoads` is inconvenient?
Is there a better way than snapshots to handle cases where manually listing multiple properties like `mapFilters.showRoads` is inconvenient?
Comments
JSON.stringify could work but doesn’t seem much different from the snapshot.
Hm, that feature wouldn’t help me if I had the state in a context.
1. Aren't you accessing the properties inside `filterItems`? If yes than that access counts as a dependency.
2. This sound like a derived more than an effect. If you can provide a repl I can help you rewrite that code to prevent the effect
Why you can't declare geoMap as state? You don't have to convert the whole class to state: just wrap it with