You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The react-hooks-strict-return rule incorrectly gets triggered in built in hook calls (useMemo, useCallback, useState, potentially others).
Example
functionuseExampleHook(input){constoptions=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?
Overview
The
react-hooks-strict-return
rule incorrectly gets triggered in built in hook calls (useMemo
,useCallback
,useState
, potentially others).Example
Consuming repo
The Shopify Web repo
The text was updated successfully, but these errors were encountered: