drcmda / drcmda/react-contextual
Having a selectors property
Open
- Dominant language
- JavaScript
- Stars
- 638
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
Maybe it would be good to declare selectors inside the definition of the store and pass them the store automatically, so we don't have to pass the store back when we call the selectors.
Something like this
```javascript
createStore({
list: [...],
search: '',
selectors: {
getFilteredList: ({list, search}) => list.filter(e => e.includes(search))
}
})
```
And then we could call it with
```javascipt
store.selectors.getFilteredList()
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.