Thanks man. Are you sure about naming with ‘use’?
I don’t think it’s mandatory, you can create any named function as hooks. Probably this might be the recommended way same as how HOC are made with ‘with’ prefix
I started programming in Basic when I was 12 years old. Since then, I developed professional projects with .Net, C#, C++, Flash, Unity 3D, PHP, Drupal, WordPress, and ultimately with React and Vue.
Thanks man. Are you sure about naming with ‘use’?
I don’t think it’s mandatory, you can create any named function as hooks. Probably this might be the recommended way same as how HOC are made with ‘with’ prefix
It's a suggestion by the React team - a best practice to make the intent clear.
Interesting. I guess I haven't tested it but it's straight from their docs:
The React team provide an ESLint plugin that prevents incorrect usage of hooks, but you must name them with
use
.reactjs.org/docs/hooks-faq.html#wh...
Yeah I got it, thanks for the link