souki is a state management library for React apps.
Install souki by npm.
npm i souki
function App() {
const InitialState = {
count: 0
};
return (
<div className="App">
<header className="App-header">
<SoukiProvider initialState={InitialState}>
<SampleComponent />
</SoukiProvider>
</header>
</div>
);
}
function SampleComponent() {
const state = useSouki();
const setSoukiState = useSetSouki();
return (
<>
<p>
{state.count}
</p>
<button onClick={() => {setSoukiState((s) => ({count: s.count + 1}))}}>
up count
</button>
</>
);
}
See the examples/create-react-app file for details.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details