Closed as not planned
Description
Given the following code:
const createHandler = () => (event) => {
const { t } = useTranslation()
Alert.alert(t("title"), t("message"))
}
function MyComponent() {
return <Button onPress={createHandler()}/>
}
the rules-of-hooks
linter rule is not triggered for the createHandler
as it should.
The linter rule should detect its not a react component, since it does not return any ReactElement
or null
.