0.15.0
In this release of Hyperapp, we bring you substantial breaking changes, improvements, bug fixes, and, believe it or not, a reduced bundle size (1397B).
Init Function (#406)
We've introduced the init(state, actions) function, which serves as a replacement for handling actions, subscribing to global events, or initializing your app. It simplifies the setup process and allows self-contained libraries like routers or interop interfaces to be exposed as modules without imposing excessive boilerplate on users. You can use the init function to subscribe to global events, start timers, fetch resources, and more.
app({
init(state, actions) {
// Subscribe to global events, start timers, fetch resources, and more!
},
})