Skip to content

Instantly share code, notes, and snippets.

View clintonlunn's full-sized avatar

Clinton Lunn clintonlunn

View GitHub Profile
@clintonlunn
clintonlunn / helpfulUseEffects.jsx
Created October 8, 2021 17:17
Helpful useEffects Yo
import { useEffect } from 'react';
// ...
const { var1, var2, var3 } = props
useEffect(() => {
console.log('tell me what loaded first time', { var1, var2, var3 })
}, [])
useEffect(() => {
console.log('tell me what changed plz ', { var1, var2, var3 })
})