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

1.0.1 • Public • Published

Redity

npm version install size Package Quality

Render generator. Redity Is a library for render control. Intended to have states outside the component tree.

npm install redity

Read the documentation here.

Example

// controller.js
import { render } from "redity";

const KEYNAME = "MY_KEYNAME";

export const store = {
  message: "",
};

export function handleClick() {
  store.message = "Welcome to Redity! 😄";
  render(KEYNAME);
}
// MyComponent.jsx
import { useRender } from "redity";
import { store, handleClick, KEYNAME } from "./Controller";

export default function MyComponent() {
  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

13

Version

1.0.1

License

MIT

Unpacked Size

5.98 kB

Total Files

10

Last publish

Collaborators

  • ertrii
  • bitzone