Just about every new user of hyperapp at some point asks the question: "How can I make components with local state?"
In React, for example, there are object-components with
render methods, and .setState()
. In Vue.js, every component has its .props
. Such components encapsulate state and behavior locally, keeping it out of the rest of the app (because it's only relevant internally to the component).
But Hyperapp's design is clear: there is one single state store, and components are purely functional. So components with local state are off the table ... right?