BlackEco@lemmy.blackeco.com to ReactEnglish · 4 days agoStart naming your useEffect functions, you will thank me laterneciudan.devexternal-linkmessage-square2linkfedilinkarrow-up113arrow-down11
arrow-up112arrow-down1external-linkStart naming your useEffect functions, you will thank me laterneciudan.devBlackEco@lemmy.blackeco.com to ReactEnglish · 4 days agomessage-square2linkfedilink
minus-squareBlackEco@lemmy.blackeco.comOPlinkfedilinkarrow-up1·3 days agoThe author actually addresses this point, explaining that since you name your effects, you should realise when they are used to sync states and take action. As a side-note, eslint-plugin-react-you-might-not-need-an-effect might be better suited to catch these.
The author actually addresses this point, explaining that since you name your effects, you should realise when they are used to sync states and take action.
As a side-note, eslint-plugin-react-you-might-not-need-an-effect might be better suited to catch these.