"By convention, the name of a hook function should start with ‘use’. It doesn’t have to, but if it doesn’t people won’t easily realise it’s a hook."
Are you sure about this? I tried changing one of my functions name from useBlah to getBlah and it broke.
now reactjs.or says: "Its name should always start with use so that you can tell at a glance that the rules of Hooks apply to it."
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
"By convention, the name of a hook function should start with ‘use’. It doesn’t have to, but if it doesn’t people won’t easily realise it’s a hook."
Are you sure about this? I tried changing one of my functions name from useBlah to getBlah and it broke.
now reactjs.or says: "Its name should always start with use so that you can tell at a glance that the rules of Hooks apply to it."