API Reference live_state v0.8.2
modules
Modules
To build a LiveState application, you'll first want to add a channel that use
s this module.
Allows customization of the representation of a given type
as the state in a LiveState.Channel
. It is called before serialization
and json diffing.
This is the default message builder for LiveState. It will send json_patch
messages for state updates. The Elixir terms are compared using the JSONDiff
library to create the
JSON patch. Because JSONDiff is not aware of any impls of the JSON Encoder protocol, the patch
may or may not match the JSON encoding in certain cases. Best effort has been made to handle common
cases such ecto schemas and DateTime. To gain further control over this process, you
may implement the LiveState.Encoder
protocol which will allow you to define a pre-diff representation.
mix-tasks
Mix Tasks
Generates a Livestate channel.
Generates a Livestate channel.