Skip to content

Tech-Phantoms/kladi

Repository files navigation

NPM JavaScript Style Guide Github License npm

Install

npm install --save kladi

Usage

import { Provider, useGlobalState } from "kladi";

import React from "react";
import ReactDOM from "react-dom";
import App from "./App";

ReactDOM.render(
  <Provider>
    <App />
  </Provider>,
  document.getElementById("root")
);

const App = (props) => {
  let [count, setCount] = useGlobalState("count", 0);

  return (
    <div>
      {count}
      <button
        onClick={() => {
          setCount(count + 1);
        }}
      >
        Press
      </button>
    </div>
  );
};

License

MIT © Tech Phantoms

About

Easy to use state management library for React

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 5