Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create withReducer function #36

Open
fahad19 opened this issue Apr 6, 2018 · 0 comments
Open

Create withReducer function #36

fahad19 opened this issue Apr 6, 2018 · 0 comments

Comments

@fahad19
Copy link
Member

fahad19 commented Apr 6, 2018

Usage example

import { compose, withReducer } from 'frint-props';

const props$ = compose(
  withReducer(
    'counterState',
    'dispatchCounter',
    (state, action) => state,
    { counter: 0 }
  )
)();

API

withState(
  stateName: string,
  dispatchName: string,
  reducer: (state, action) => state,
  initialState
)
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

No branches or pull requests

1 participant