1.0.7 • Published 5 years ago

tembolok v1.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Tembolok

Persistent state management for React

NPM JavaScript Style Guide

Install

yarn add tembolok

or, if you using npm

npm install --save tembolok

useStore in action

useStore

Sample code

import React from 'react'
import { useStore } from 'tembolok'

const App = () => {
  const [data, setData] = useStore('data')

  const increment = () => {
    setData({
      counter: (data?.counter || 0) + 1,
    })
  }

  return (
    <div>
      <h1>{data.counter || 0}</h1>
      <button onClick={increment}>Increment</button>
    </div>
  )
}

export default App

License

MIT © arbo77

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago