React patterns: Run effect only on mount
4 September 2022 (Updated 4 September 2022)
useEffect(() => {
console.log('Well, hello there')
}, []) // No dependencies - no need to ever re-run
Tagged:
React patterns
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment