Error
Uncaught TypeError: Object(...) is not a function
import { useSelector, useDispatch, useRef } from 'react-redux'
const mounted = useRef();
useEffect(() => {
console.log('mounted', mounted)
console.log('useEffect props:', props)
I have a functional component and trying to take advantage of hooks to use componentDidUpdate, in my onSubmit function I fire a dispatch to call and API, and I need to see what is the resulting payload of that API, which is stored in redux. But I get the error above?
I found this answer which said to use useRef Equivalent to componentDidUpdate using React hooks