Raxol.UI.State.Management.StateManagementServer (Raxol v2.9.2)

View Source

Unified GenServer for UI state management, handling both store operations and component hooks without Process dictionary usage.

This server consolidates:

  • Global state store management
  • Component state and hooks
  • Debounce timer management
  • Render context tracking

Features

  • Redux-like state management
  • React-like hooks support
  • Per-component state isolation
  • Automatic cleanup on process termination

Summary

Functions

cancel_debounced(key)

child_spec(init_arg)

Returns a child specification for this server.

clear_component_context(component_id)

clear_hook_state(component_id)

dispatch(action)

get_all_hook_state(component_id)

get_cache(key)

get_component_id(pid \\ nil)

get_component_process(pid \\ nil)

get_hook_state(component_id, hook_id)

get_render_context(pid \\ nil)

get_state(path \\ [])

handle_manager_call(request, from, state)

Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_call/3.

handle_manager_cast(msg, state)

Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.

handle_manager_info(msg, state)

Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.

register_reducer(reducer_fn)

schedule_debounced(key, message, delay_ms)

schedule_update(component_id)

set_cache(key, value)

set_component_id(id, pid \\ nil)

set_component_process(process_pid, pid \\ nil)

set_hook_state(component_id, hook_id, value)

set_render_context(context, pid \\ nil)

start_link(init_opts \\ [])

Starts the server, registered under its module name unless :name is given: the public API calls it by that name.

subscribe(path, callback, options \\ [])

unsubscribe(subscription_id)

update_state(path, value)