@36node/redux-ui
A higher order component decorator some functions using Redux and React
Last updated a year ago by zzswang .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @36node/redux-ui 
SYNC missed versions from official npm registry.

Redux ui

version downloads

Use

Config redux:

import { reduxUiReducers } from "@36node/redux-ui";

combineReducers({
  ...reduxUiReducers,
});

Assign

Save any value to redux.

actions:

import { createAssignActions } from "@36node/redux-ui/assign";

const assignActions = createToggleActions("someKey");

// set action: set value
dispath(assignActions.set(someValue));

selector:

import { createAssignSelector } from "@36node/redux-ui/assign";

// selector maker
const selector = createAssignSelector("someKey");

const assign = selector(state).assign;

Toggle

Open or close a toggle to redux.

actions:

import { createToggleActions } from "@36node/redux-ui/toggle";

const toggleActions =  createToggleActions("someKey"),

// open toggle action
dispath(toggleActions.open());

// close toggle action
dispath(toggleActions.close());

// set toggle action
dispath(toggleActions.set(true or false));

selector:

import { createToggleSelector } from "@36node/redux-ui/toggle";

// selector maker
const selector = createToggleSelector("someKey");

const toggle = selector(state).toggle;

Progress

Represent an progress logic in redux.

actions:

import { createProgressActions } from "@36node/redux-ui/progress";

const progressActions = createProgressActions("someKeys");

// increase action, default step = 1
dispatch(progressActions.increase(5));
// decrease action, default step = 1
dispatch(progressActions.decrease(5));
// init action, default params: step = 1, min = 0, max = 100
dispatch(progressActions.init(1, 0, 100));

selector:

import { createProgressSelector } from "@36node/redux-ui/progress";

const selector = createProgressSelector("someKey");

// progressState: {step, min, max}
const progressState = selector(state);

Current Tags

  • 0.0.31                                ...           latest (a year ago)

29 Versions

  • 0.0.31                                ...           a year ago
  • 0.0.30                                ...           a year ago
  • 0.0.29                                ...           a year ago
  • 0.0.28                                ...           a year ago
  • 0.0.27                                ...           a year ago
  • 0.0.26                                ...           a year ago
  • 0.0.25                                ...           a year ago
  • 0.0.24                                ...           a year ago
  • 0.0.23                                ...           a year ago
  • 0.0.22                                ...           a year ago
  • 0.0.21                                ...           a year ago
  • 0.0.20                                ...           a year ago
  • 0.0.19                                ...           a year ago
  • 0.0.18                                ...           a year ago
  • 0.0.17                                ...           a year ago
  • 0.0.16                                ...           a year ago
  • 0.0.15                                ...           a year ago
  • 0.0.14                                ...           a year ago
  • 0.0.13                                ...           a year ago
  • 0.0.12                                ...           a year ago
  • 0.0.11                                ...           a year ago
  • 0.0.10                                ...           a year ago
  • 0.0.9                                ...           a year ago
  • 0.0.8                                ...           a year ago
  • 0.0.7                                ...           a year ago
  • 0.0.6                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.1                                ...           a year ago
Downloads
Today 0
This Week 29
This Month 29
Last Day 0
Last Week 0
Last Month 87
Dependencies (2)
Dev Dependencies (8)

Copyright 2014 - 2016 © taobao.org |