Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
4 tasks
Pierre-MarieMarchio opened this issue May 6, 2025 · 0 comments
Open
4 tasks
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@Pierre-MarieMarchio
Copy link
Owner

Pierre-MarieMarchio commented May 6, 2025

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.
@Pierre-MarieMarchio Pierre-MarieMarchio self-assigned this May 6, 2025
@Pierre-MarieMarchio Pierre-MarieMarchio added the documentation Improvements or additions to documentation label May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Backlog
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant