Skip to content

How would this work with ReasonReact.SideEffects #1

@damienadermann

Description

@damienadermann

Love the tutorial. However I've been looking around for how to handle side effects properly with reducer components and can't find much information. A scenario being if we had a button that loaded the next page. In js react land you might trigger an action that does a side effect that optionally does a state changes along the way.

The flow would be

  1. dispatch action
  2. reducer doesn't do anthing with action (NoUpdate)
  3. Middleware handles the action allowing for more actions to be dispatched and side effects to fetch data or do some other work

Tools that promote this pattern:
-https://github.com/redux-saga/redux-saga
-https://github.com/redux-observable/redux-observable

How would you handle doing a side effect from an event, like the click load more example above?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions