npm install --save use-set-state
import React, { Component } from 'react'
import { useMyHook } from 'use-set-state'
const Example = () => {
const example = useMyHook()
return (
<div>{example}</div>
)
}
This hook is created using create-react-hook.