init method

Cmd? init()

Returns an optional command to execute on program startup.

This is called once when the program starts, after the initial view has been rendered. Use it to:

  • Start timers for animations
  • Fetch initial data
  • Set up subscriptions

Return null if no initialization is needed.

Implementation

Cmd? init() => null;