All Projects → richardcrng → redux-leaves

richardcrng / redux-leaves

Licence: other
Write once. Reduce anywhere.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to redux-leaves

riduce
Get rid of your reducer boilerplate! Zero hassle state management that's typed, flexible and scalable.
Stars: ✭ 14 (-73.08%)
Mutual labels:  state-management, reducer
flow-state
UI state management with RxJS.
Stars: ✭ 33 (-36.54%)
Mutual labels:  state-management, reducer
RxReduxK
Micro-framework for Redux implemented in Kotlin
Stars: ✭ 65 (+25%)
Mutual labels:  state-management, reducer
Immer
Create the next immutable state by mutating the current one
Stars: ✭ 21,756 (+41738.46%)
Mutual labels:  reducer, state-tree
Use Substate
🍙 Lightweight (<600B minified + gzipped) React Hook to subscribe to a subset of your single app state.
Stars: ✭ 97 (+86.54%)
Mutual labels:  state-management, reducer
react-stateful-component
Functional stateful React components with sideEffect support
Stars: ✭ 19 (-63.46%)
Mutual labels:  state-management, reducer
React Recomponent
🥫 Reason-style reducer components for React using ES6 classes.
Stars: ✭ 272 (+423.08%)
Mutual labels:  state-management, reducer
Redux Orm
A small, simple and immutable ORM to manage relational data in your Redux store.
Stars: ✭ 2,922 (+5519.23%)
Mutual labels:  state-management, reducer
Mobx State Tree
Full-featured reactive state management without the boilerplate
Stars: ✭ 6,317 (+12048.08%)
Mutual labels:  state-management, state-tree
Redux Machine
A tiny library (12 lines) for creating state machines in Redux apps
Stars: ✭ 338 (+550%)
Mutual labels:  state-management, reducer
Redhooks
Predictable state container for React apps written using Hooks
Stars: ✭ 149 (+186.54%)
Mutual labels:  state-management, reducer
Juicr.js
A simple (and tiny <1kb) redux inspired reducer for handling state changes.
Stars: ✭ 102 (+96.15%)
Mutual labels:  state-management, reducer
redux-interactions
Composing UI as a set of interactions
Stars: ✭ 22 (-57.69%)
Mutual labels:  state-management, reducer
NestedReact
BackboneJS compatibility layer for React-MVx MVVM framework.
Stars: ✭ 79 (+51.92%)
Mutual labels:  state-management
mutable
State containers with dirty checking and more
Stars: ✭ 32 (-38.46%)
Mutual labels:  state-management
Teapot
Unidirectional Dataflow library for Android inspired by The Elm Architecture
Stars: ✭ 29 (-44.23%)
Mutual labels:  state-management
Flutter Roadmap
This is a flutter roadmap and documentation repository. If anyone is interested you can join the party to help the community and make flutter great again.
Stars: ✭ 47 (-9.62%)
Mutual labels:  state-management
react-nested-loader
The easiest way to manage loaders/errors inside a button. NOT an UI lib.
Stars: ✭ 62 (+19.23%)
Mutual labels:  state-management
use-state-machine
Use Finite State Machines with React Hooks
Stars: ✭ 28 (-46.15%)
Mutual labels:  state-management
xstate
State machines and statecharts for the modern web.
Stars: ✭ 21,286 (+40834.62%)
Mutual labels:  state-management

Redux Leaves

Write once. Reduce anywhere.

Travis (.org) Coverage Status bundle size npm version

Example

import { createStore } from 'redux'
import reduxLeaves, { bundle } from 'redux-leaves'

// set up with initial state
const initialState = {
  counter: 0,
  list: [],
  props: {}
}

const [reducer, actions] = reduxLeaves(initialState)
const store = createStore(reducer)

// setup complete! Now dispatch actions to your heart's content

console.log(store.getState())
// => { counter: 0, list: [], props: {} } 

store.dispatch(actions.counter.create.increment(10))
console.log(store.getState())
// => { counter: 10, list: [], props: {} }

store.dispatch(actions.list.create.push('foo'))
console.log(store.getState())
// => { counter: 10, list: ['foo'], props: {} }

const compoundAction = bundle([
  actions.counter.create.reset(),
  actions.list[0].create.concat('bar'),
  actions.props.at.arbitrary.path.create.update('here I am!')
])

store.dispatch(compoundAction)
console.log(store.getState())
/*
  => {
    counter: 0,
    list: ['foobar'],
    props: { at: { arbitrary: { path: 'here I am!' } } }
  }
*/

Documentation

npm install --save redux-leaves

Main documentation website

Getting started

API reference

Testing

To run all tests locally:

git clone [email protected]:richardcrng/redux-leaves.git
cd redux-leaves && npm run test a

Most tests are located alongside their relevant API documentation in the docs folder.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].