@react-hooke/react
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@react-hooke/react

Recipes

useConst

import { useConst } from "@react-hooke/react";

function C(): JSX.Element {
  const one = useConst(() => 1);
  return <>{one}</>;
}

useDependent

import { useDependent } from "@react-hooke/react";

function C({ p1, p2 }: { p1: string; p1: string }): JSX.Element {
  const dependentOnP1AndP2Changing = useDependent(() => `${p1}${p2}`, [p1, p2]);
  return <>{dependentOnP1AndP2Changing}</>;
}

Readme

Keywords

Package Sidebar

Install

npm i @react-hooke/react

Weekly Downloads

1

Version

0.1.1

License

ISC

Unpacked Size

7.39 kB

Total Files

13

Last publish

Collaborators

  • marco.toniut