Motivation
The pattern come from these two issues:
Shopify/quilt#1813
facebook/react#18545
TL;DR
React core team is in discussion on adding warming for this and we can stop the bleeding earlier by adding this as a lint rule.
🚫 fail lint:
mutate refs in render method.
✅ pass lint:
mutate ref in a useEffect