1.2.4 • Published 5 years ago

souki v1.2.4

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

☁️ souki(想起)

souki is a state management library for React apps.

Getting stated

Installing

Install souki by npm.

npm i souki

Example

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.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

1.2.4

5 years ago

1.2.3

5 years ago

1.2.0

5 years ago

1.2.2

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago