3 ms·
The "color" you're talking about is the "use" naming convention that's enforced by the linter. So if you call a Hook, you're supposed to call your function `use
by danabramov 8y ago
The "color" you're talking about is the "use" naming convention that's enforced by the linter. So if you call a Hook, you're supposed to call your function `useSomething()`, and we consider it a Hook too.
In practice we haven't seen this to cause confusion from people who actually tried this proposal for more than a few hours.
See https://reactjs.org/docs/hooks-rules.html https://reactjs.org/docs/hooks-rules.html