https://mayank-gupta-6-88.medium.com/maintaining-previous-state-props-in-react-hooks-using-useref-c258a50f9812