Repository navigation
v2.0.0
This release includes several API improvements, most notably to how messages are dispatched from an update function. Instead of returning a tuple with the updated model and list of commands #(Model, List(Cmd)) the update function simply returns the updated model but now provides a Dispatcher(Msg) function which can be used to dispatch messages to the reducer for message chaining and async operations. Please refer to the updated hex docs and sprocket guide for the new reducer pattern https://sprocket.live/state-management.
The top-level sprocket API has also been refactored to only include items relevant and useful to a typical sprocket component and all runtime-specific items have been moved to the sprocket/runtime module. This was done to limit the imports required when defining a component. Most developers likely will never interact directly use these runtime functions and instead would use a bridge library appropriate to their web framework, e.g. sprocket_mist https://github.com/bitbldr/sprocket_mist so it doesn't make much sense for these to live in the top-level sprocket module.