Two-way binding in frontend frameworks is a divisive topic. It reduces boilerplate by automatically syncing state between parent and child components, but introduces risks around implicit mutations, unclear ownership, and hard-to-trace update loops. The post examines three approaches to managing these risks: explicit opt-in (Svelte's bind: syntax), internal read/write segregation via events (Vue's v-model), and full read/write separation that avoids two-way binding entirely (React and SolidJS). The author, creator of SolidJS, personally favors the no-two-way-binding approach and outlines red flags to watch for in framework design, such as implicit binding, mutable primitives passed freely, and writing to props in deeply reactive systems.
Table of contents
What is Two-way Binding Copy link Link copied!Appreciating the Problem Copy link Link copied!Are there Solutions? Copy link Link copied!Yes or No? Copy link Link copied!Sort: