New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

reox

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reox

sample react state management

latest
npmnpm
Version
0.0.5
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

Reox

使用 react18 的 useSyncExternalStore 做的状态管理工具

快速上手

import reox from 'reox';

const store = reox({
  count: 0,
});

export default function HomePage() {
  const { count } = store;
  return (
    <div>
      <p>{count}</p>
      <div>
        <button onClick={() => store.count++}>+</button>
        <button onClick={() => store.count--}>-</button>
      </div>
    </div>
  );
}

Keywords

state

FAQs

Package last updated on 28 Oct 2022

Related posts