Skip to content

.updates(): allow a handler to return null or false to prevent a state update #55

@couzic

Description

@couzic

Currently, one can return (state) => state

      searchBeerName: name => name.length > 0
          ? _.focusPath('loading').setValue(true)
          : state => state,

Returning null would look like:

      searchBeerName: name => name.length > 0
          ? _.focusPath('loading').setValue(true)
          : null,

Returning false would look like:

      searchBeerName: name => name.length > 0 && _.focusPath('loading').setValue(true)

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