Katargha is an sub-module bundler for the CRA based projects, works without ejecting from CRA
This custom hook allows you to get previous value from the useState