Dominic Gannaway
Dominic Gannaway
> Indeed our prettier plugin pretends that white space at the top level doesn't matter (i.e. as if the component is a block element). It's the desired behavior in 99%...
Yeah a warning makes most sense.
You’ll just have to wait :)
What we could do is permit `return $state()` but add a runtime check in DEV that checks if the object is actually a proxy and throw an error/warning if not...
Just make the original object state, then you don’t need to create state to assign to it.
> just saying that if there is a non-state object, it's cumbersome to add properties to it vs just a simple assignment. You're trying to add a reactive state of...
> Just for clarity, what I was aiming for is for svelte to perform a code transformation when assigning state directly. That's far too magical and simply assumes too much....
Direct object property is almost double the test for me
It appears you've not setup the Proxy properly in your benchmark, you're only handling `set`, but not `defineProperty`?
> > It appears you've not setup the Proxy properly in your benchmark, you're only handling `set`, but not `defineProperty`? > > I was just testing pass throughs without traps....