1.0.7 • Published 3 years ago

tembolok v1.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
3 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

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago