Overview
The react-hooks-strict-return rule incorrectly gets triggered in built in hook calls (useMemo, useCallback, useState, potentially others).
Example
function useExampleHook(input) {
const options = useMemo(() => [
`${input}1`,
`${input}2`,
`${input}3`,
// eslint error gets reported here
], [input]);
// ... even if this doesn't return `options` the rule gets triggered.
}
Consuming repo
What repo were you working in when this issue occurred?
The Shopify Web repo