‚̧Narcissistic Pickle Meister
    Have ideas to improve npm?Join in the discussion! ¬Ľ

    weeflux-partial-reducer

    1.0.0¬†‚Äʬ†Public¬†‚Äʬ†Published

    weeflux-partial-reducer

    A partital reducer creator for weeflux

    import flux from 'weeflux';
    import partial from 'weeflux-partial-reducer';
     
    // reducer for text prop
    flux(partial('text', actions.textChanged, (state, { payload }) => payload));
     
    flux(
      partial(
        // reducer for profile prop
        'profile',
        // handle multiple actions with one reducer
        [actions.profileLoaded, actions.profileFailed, actions.profileLoading],
        (state, { payload }) => payload
      )
    );

    Install

    npm i weeflux-partial-reducer

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    27.1 kB

    Total Files

    13

    Last publish

    Collaborators

    • avatar