3 ms·
Speaking of badly-named hooks, this tweet infuriated me. If it's legal, the linter should allow it. F$@k "consistency." https://twitter.com/acdlite/status/158
by CottonMcKnight 4y ago
Speaking of badly-named hooks, this tweet infuriated me.
If it's legal, the linter should allow it. F$@k "consistency."
https://twitter.com/acdlite/status/1581401077915975680 https://twitter.com/acdlite/status/1581401077915975680
- AgentME 4y agoI've run into places where it would be handy to conditionally use hooks, but never the useContext hook, so I can't imagine feeling strongly about that case.
- lmm 4y agoDefine "legal". Calling glibc memcpy with overlapping arrays worked right up until it didn't. The general contract of react hooks is that they may break in unexpected ways if you call them conditionally. The current implementation of useContext happens to not break.