How to use the stamen.createStore function in stamen

To help you get started, we’ve selected a few stamen examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github forsigner / stamen / examples / basic / src / App.js View on Github external
import React from 'react'
import { createStore } from 'stamen'

const CounterStore = createStore({
  state: {
    count: 10,
  },
  reducers: {
    increment(state) {
      state.count++
    },
    decrement(state) {
      state.count--
    },
  },
  effects: {
    async asyncIncrement(state) {
      state.count++
    },
  },

stamen

<img src="http://forsigner.com/images/dahlia/dahlia-stamen.svg" align="center"/>

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Popular stamen functions

Similar packages