v0.3.0
[0.3.0] - 2025-01-04
Effects, TaskManager, and Subscriptions for declarative async handling.
Added
EffectStore- reducer returns effects alongside state changesEffectStoreWithMiddleware- effect store with middleware supportDispatchResult<E>- result type withchangedflag andeffectsvecTaskManager- spawn/cancel async tasks that produce actionsspawn(key, future)- run task, cancel previous with same keydebounce(key, duration, future)- debounced task executioncancel(key)/cancel_all()- task cancellationpause()/resume()- pause/resume task output
Subscriptions- interval and stream-based action sourcesinterval(key, duration, action_fn)- periodic action emissioninterval_immediate(key, duration, action_fn)- emit immediately then periodicallystream(key, stream, map_fn)- forward stream items as actionscancel(key)/cancel_all()- subscription cancellationpause()/resume()- pause/resume subscriptions
DebugLayer::with_task_manager()- auto-pause tasks in debug modeDebugLayer::with_subscriptions()- auto-pause subscriptions in debug mode- Weather example: multi-color sprite layers (sun=yellow, cloud=gray, etc.)
- Weather example: loading indicator in title bar (sprite stays visible during refresh)
Changed
- Weather example now uses
EffectStorewithTaskManagerandSubscriptions