score:10

Accepted answer

the problem here is your component name starting with a lowercase letter.

see eslint-plugin-react-hooks code source

/**
 * checks if the node is a react component name. react component names must
 * always start with a non-lowercase letter. so `mycomponent` or `_mycomponent`
 * are valid component names for instance.
 */

function iscomponentname(node) {
  if (node.type === 'identifier') {
    return !/^[a-z]/.test(node.name);
  } else {
    return false;
  }
}

Related Query

More Query from same tag