Skip to content

Commit

Permalink
feat: Add useList hook and remove old list selector
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

`List.selector` is no longer available. Use new hook to interact with
state and actions.

```js
// define list
const todos = buildList("TODOS", {
  read: () => {}
})

// New
// Access all available actions and selector
const {
  selector, create, read, readOne, update, delete, clear
} = useList(todos, store.dispatch)

// New
// All previous selector are available throught the new hook
const { items, isLoaded } = selector(store.getState())
```
  • Loading branch information
andreidmt committed Oct 2, 2019
1 parent c0260fc commit 80c489a
Show file tree
Hide file tree
Showing 4 changed files with 306 additions and 201 deletions.
Loading

0 comments on commit 80c489a

Please sign in to comment.