0.1.6 • Published 3 years ago
@andrewizbatista/use-render v0.1.6
useRender
A simple React hook that allows you to force a re-render of a Component with ZERO dependencies.
Table of Contents
Getting Started
Prerequisites
This package has peerDependencies that are required for you to include in your app's dependencies:
{
"dependencies": {
"react": "^17.0.2"
}
}Installing
yarn
yarn add @andrewizbatista/use-rendernpm
npm install @andrewizbatista/use-renderUsage
Use it as you would use any other React hook.
import { useRender } from '@andrewizbatista/use-render';
function Usage() {
const { forceRender } = useRender();
return <Button onClick={forceRender}>Click to Re-Render the Component</Button>;
}Contributing
Want to help? Feel free to open an Issue or create a Pull Request and let's get started 🚀
License
MIT © André Batista (@andrewizbatista) 🎉