Skip to content

docs: add documentation for local and ad-hoc effect registration #3

@Pierre-MarieMarchio

Description

@Pierre-MarieMarchio

Description:

Update the documentation to explain how to:

  • Register Effects locally within a Manager (just like local Updators)
  • Use ad-hoc Effects, passed directly into a dispatch call without prior registration

This documentation will guide users on how to use these features and understand their scope and lifecycle.


Tasks:

  • Document local effect registration

    • Explain what local effect registration is and why it's useful
    • Provide an example of registering effects locally in a Manager (with code)
    • Explain how to ensure local effects are scoped to the Manager and not globally registered
  • Document ad-hoc effect usage

    • Explain what ad-hoc effects are and how they differ from local/global effects
    • Provide an example of using an effect directly in a dispatch call (with code)
    • Mention the limitations and use cases for ad-hoc effects (such as testing or isolated behavior)
  • Lifecycle and order of execution

    • Describe the execution order: Action → Updator → Effect
    • Mention the possibility to extend the lifecycle in the future for beforeUpdator behavior
    • Explain how local and ad-hoc effects fit into this lifecycle
  • Provide example code snippets

    • Add working examples for both local and ad-hoc effect registrations
    • Ensure the examples are clear and show real-world usage scenarios

Expected Outcome:

  • The documentation should provide a clear, structured explanation of local and ad-hoc effect usage.
  • Code snippets should be easy to understand and relevant to typical use cases.
  • Developers should be able to easily integrate these patterns into their own projects.

Metadata

Metadata

Labels

documentationImprovements or additions to documentation

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions