Skip to content

Effects <=> expansions #197

@acobster

Description

@acobster

Effects should be treated as a special case of the ::bread/expand lifecycle phase. In an expansion or effect returns a map with an :effects (or ::bread/effects?) key, Bread should process them before moving on to the next expansion. Conversely, any expansions returned from an effect should be run before processing the next effect or expansion.

This is to solve the awkward issue with the current API where we must wait for ALL expansions to finish before ANY effects can start to be processed, even though the intuitive dependency chain may be more nuanced. For example, if we wanted to store the results of an effect and then run a db query based on that, we'd have to do so in an effect body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions