The author, a Vue developer, initially found React to be complex and preferred Svelte's simplicity. However, React has become the standard for frontend development, backed by Meta and offering a large job market. The author decided to bring Svelte's elegance to React, creating an experiment called React Runes. React Runes aims to simplify traditional React state management with a "runes" system, providing simplicity, ergonomics, performance, and clarity. The system has three fundamental primitives: state, derived, and effect, along with a powerful $ hook. The $ hook allows components to consume reactive runes, automatically subscribing to their values and re-rendering only when the rune's value changes. React Runes leverages zustand for efficient state tracking and batching updates for optimal performance. The author encourages a "vertical slice" architecture, co-locating UI, reactive state, and logic within the same directory. React Runes is an experiment, not intended for production use, and pushes the boundaries of React ergonomics. The author invites feedback, contributions, and discussions on the project, available on GitHub and NPM.
dev.to
dev.to
Create attached notes ...
