So I have this:
let total = newDealersDeckTotal.reduce(function(a, b) { return a + b; }, 0); console.log(total, \'t
In case of hooks, you should use useEffect hook.
useEffect
const [fruit, setFruit] = useState(''); setFruit('Apple'); useEffect(() => { console.log('Fruit', fruit); }, [fruit])