Skip to content

New reducer format #41

Closed
Closed
@L3P3

Description

Instead of returning a dispatch method, return an object with methods for each action.

const [count, {increment}] = hook_model({
  init: () => 0,
  increment: n => n+1,
});

Both reducer hooks should be deprecated.

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions