Skip to content

Selector proposal - #24

Open
lucasconstantino wants to merge 3 commits into
choko-org:masterfrom
lucasconstantino:selector-path
Open

lucasconstantino wants to merge 3 commits into
choko-org:masterfrom
lucasconstantino:selector-path

Conversation

@lucasconstantino

Copy link
Copy Markdown
Contributor

Redux-boot does not rely on combinators. Sometimes when we need to simply attach reducers from other projects the code can be unnecessarily big. Take as an example the usage of redux-form reducer:

import { reducer } from 'redux-form'

const formModule = {
  reducer: (state, action) => ({
    ...state,
    form: reducer(state.form, action)
  })
}

This is not really bad, but maybe we could do the following:

import { reducer } from 'redux-form'

const formModule = {
  selector: 'form',
  reducer
}

Basically, what this pull-request accomplishes is wrap any reducer and resolve "selector" paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant