redity
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Redity

npm version install size

Manage renders.

npm install redity

Read the documentation here.

import { useRender, render } from "redity";
export const KEYNAME = "MY_KEYNAME";
export const store = {
  message: "",
};
// outside function
function handleClick() {
  store.message = "Welcome to Redity!";
  render(KEYNAME);
}

export default function Component() {
  useRender(KEYNAME);
  return (
    <div>
      <p>{store.message}</p>
      <button onClick={handleClick}>Click me! :D</button>
    </div>
  );
}

Requirements: react@^16.8.0

Readme

Keywords

Package Sidebar

Install

npm i redity

Weekly Downloads

39

Version

1.1.0

License

MIT

Unpacked Size

5.55 kB

Total Files

10

Last publish

Collaborators

  • ertrii
  • bitzone