Skip to content

erikmode/home-made-observable-state

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

home-made-observable-state

home-made-observable-state

Usage example

import React from 'react'
import useTest from './test-store'

export default function Purchases() {
  const { state, actions } = useTest()

  return (
    <div className='pt-5'>
      <div>
        {state.name}, {state.count}
        <br></br>
        <button className='button' onClick={actions.incrementCount}>+</button>
        <button className='button' onClick={actions.decrementCount}>-</button>
      </div>
    </div>
  )
}

About

home-made-observable-state

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published