heluxjs/helux

和jotai ,valtio 的对比有吗, 另外readme里的教程用的还是class,有function版本的吗

tom-and-jary opened this issue · 4 comments

谢谢

Readme里有function版本呀

function DemoFn(){
  const { state, setState } = useConcent('counter'); // 👈 call useConcent hook in fn component
  const inc = ()=> setState({num: state.num + 1});
  return <button onClick={inc}>{state.num}</button>
}

有一个和 recoil的对比文章哈
https://juejin.cn/post/6844904190431461383

哦谢谢, 方便的话,多增加一点 最佳实践 :)

更轻量的状态库 helux 来了, https://github.com/tnfe/hel/tree/main/packages/helux 也可以试试哦