pixiebrix / eslint-config-pixiebrix

Custom eslint config, to be used with Prettier
MIT License
1 stars 1 forks source link

Create local rule to validate isMounted usage in useAsyncEffect #243

Open grahamlangford opened 8 months ago

grahamlangford commented 8 months ago

Context

fregante commented 7 months ago

This might also be possible via types. It was annoyance for me too:

Side note: components should prefer cancelling work in progress wherever possible (which is rarely possible, actually) https://legacy.reactjs.org/blog/2015/12/16/ismounted-antipattern.html