@x.render/render-app
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

render-app

NPM version

NPM Downloads

中文文档

Introduce

Provides commonly used hooks and utility functions for React.

Usage

npm i @x.render/render-app -S

Hooks

Many commonly used hooks are provided in render-app

usePageShow

usePageShow is used to execute related callback functions when the page is visible and invisible.

import { usePageShow } from "@x.render/render-app";

const Demo = () => {
  const pageShow = () => {
    console.log("Page not visible");
  };

  const pageHidden = () => {
    console.log("Page  visible");
  };
  usePageShow(pageShow, pageHidden);
  return <div>demo</div>;
};
export default Demo;

the parameters executed by usePageShow are not required.

Readme

Keywords

none

Package Sidebar

Install

npm i @x.render/render-app

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

4.96 kB

Total Files

8

Last publish

Collaborators

  • cubber