philipwhiuk 4 days ago

Svelte stores just sound like adding Redux to React, which used to be in vogue then stopped being in vogue and I guess this blog post marks them being back in vogue.

1
digianarchist 4 days ago

The blog post compares an example using hooks to pass in a state and update function to a child component. It then compares that to a Svelte component which contains a state variable.

Those two examples aren't equivalent because any parent component wrapping the Svelte component doesn't have access to the state whilst App (in the React example) does.

For the Svelte example to be equivalent, the component would have to export the store.

A minor gripe but the hooks vs Svelte state is pretty minor issue in itself.