Reim
Github
2.0.0
2.0.0
  • Reim.js
  • Introduction
    • Motivation
    • Concepts
  • Guide
    • Store
    • setState
    • Subscribe
    • Plugin
    • Event Emitter
    • Use with React / Preact
    • Use with Vue
    • Use with Angular / Rxjs
  • Ecosystem
    • react-reim
    • reim-task
    • reim-reporter
    • reim-persist
    • Release Notes
Powered by GitBook
On this page
  1. Guide

setState

PreviousStoreNextSubscribe

Last updated 6 years ago

CtrlK

Actions in Reim is like better Reducer in Redux, but with immer

const actions = {
  increment: amount => state => void (state.count += amount)
}

const store = reim({}, {actions})

// later...
store.increment(10)