-
Notifications
You must be signed in to change notification settings - Fork 49.2k
Closed as not planned
Labels
Component: ESLint RulesResolution: StaleAutomatically closed due to inactivityAutomatically closed due to inactivityStatus: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug
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
.
Metadata
Metadata
Assignees
Labels
Component: ESLint RulesResolution: StaleAutomatically closed due to inactivityAutomatically closed due to inactivityStatus: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug