2.3.0 • Published 4 months ago

flowregime v2.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

flowregime

Flowregime is a component that uses hooks+context for state management with React.

npm bundle size GitHub https://github.com/NickLJudy/flowregime/commits/main

Installation

The flowregime package lives in npm. To install the latest stable version, run the following command:

npm i flowregime

Or if you're using yarn:

yarn add flowregime

Usage

There are only two APIs:

StateWrapper

Wrap your components.

<StateWrapper>
  <App />
</StateWrapper>

useCtrlState

The logic is similar to useState.

const [state,dispatch] = useCtrlState(stateSign,initState)

//eq:
const  [count,setCount]= useCtrlState(`MULTI-COUNT`,{num:1})

License

Flowregime is MIT licensed.

2.3.0

4 months ago

2.1.2

2 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

0.0.1

3 years ago

1.1.0

3 years ago

0.0.2

3 years ago

1.0.0

3 years ago