Raxol. Core. Runtime. ProcessComponent
(Raxol v2.6.0)
View Source
A GenServer wrapping a single component module for crash isolation.
Each ProcessComponent runs in its own process under Raxol.DynamicSupervisor,
so a crash in one component does not bring down the rest of the application.
On crash, the DynamicSupervisor restarts the component with fresh state.
Usage
Components used with ProcessComponent must implement:
init/1- receives props, returns initial staterender/2- receives state and context, returns element treeupdate/2(optional) - receives message and state, returns new state
Use the process_component/2 View DSL helper to embed process components:
process_component(MyHeavyWidget, %{path: "/tmp"})
Summary
Functions
Returns a specification to start this module under a supervisor.