5 ms·
> bind:group is not a "special string" but simply part of the API Right, but the difference is in the API design. React gives you a small set of tools to imple
by ng12 7y ago
> bind:group is not a "special string" but simply part of the API
Right, but the difference is in the API design. React gives you a small set of tools to implement whatever functionality you need. Svelte gives you specially-crafted tools which to handle specific scenarios. Svelte gives you a command to bind input groups to a stateful value, React gives you the tools to do it yourself. The difference is subtle but experience has lead me to vastly prefer the latter, mostly because you're less reliant on the framework designer getting everything "right".
Here's a good talk which helps explain the difference: https://2014.jsconf.eu/speakers/sebastian-markbage-minimal-api-surface-area-learning-patterns-instead-of-frameworks.html https://2014.jsconf.eu/speakers/sebastian-markbage-minimal-a...
- atan 7y agoI think React gives you more specially-crafted tools than you suggest and Svelte gives you fewer than you suggest. Even in this case, bind:group is just a shortcut -- Svelte also provides the tools to "do it yourself" if you need that ability in some special case (see https://svelte.dev/repl/3cffb15ef71f43b08872f72c527089a2?version=3.9.2 https://svelte.dev/repl/3cffb15ef71f43b08872f72c527089a2?ver...).