## About the project
npm install react-resetable-stateDo you ever was in the situation where you want to reset your React.js state?
This project got you covered!
Now you want to see this small package in action? No problem!
1. Install the package:
- npm: npm i react-resetable-state
- yarn: yarn add react-resetable-state
2. Import the package
``js`
const { useResetableState } = require('react-resetable-state');
3. Use the package
`jsx
const App = () => {
const [counter, resetCounter, setCounter] = useResetableState(0);
return
Here are some examples which are written in TypeScript.
If you want to use JavaScript instead, look in the section above.
Since this package is written in TypeScript it also ships with type definitions!
It doesn't matter if you are using JavaScript or TypeScript directly, any good IDE will show the type hints for this custom hook.