Next generation State management library to replace UseState.
npm i nsus
yarn add nsus
- esNext
- React Hook
Javascript
import useData from "nsus";
const app = () => {
const state = useData({ count: 0 });
return <button onClick={() => state.count++}>{state.count}</button>;
};
Typescript
// Same code, support Typescript.
import useData from "nsus";
const app = () => {
const state = useData({ count: 0 });
return <button onClick={() => state.count++}>{state.count}</button>;
};
This library is inspired by Vuejs. I hope that two-way data binding is possible even in react.
- Direct state change via proxy.
- Automatic dom Reconciliation.
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards-compatible manner, and
- PATCH version when you make backwards-compatible bug fixes.
example:) v0.0.18 is
18th patched.
not thing
Tell me what you need? issue
This is Example boilerplate code.
You can get better way.