[1/2] [@graphiql/react] compile source code with react-compiler, remove useMemo
and useCallback
usages
#994
Annotations
6 warnings
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Run yarn eslint:
packages/graphiql-react/src/editor/context.tsx#L325
The 'setShouldPersistHeaders' function makes the dependencies of useEffect Hook (at line 345) change on every render. To fix this, wrap the definition of 'setShouldPersistHeaders' in its own useCallback() Hook
|
Run yarn eslint:
packages/graphiql-react/src/editor/query-editor.ts#L517
The 'externalFragmentList' array makes the dependencies of useEffect Hook (at line 531) change on every render. Move it inside the useEffect callback. Alternatively, wrap the initialization of 'externalFragmentList' in its own useMemo() Hook
|
Run yarn eslint:
packages/graphiql-react/src/plugin.tsx#L153
The 'setVisiblePlugin' function makes the dependencies of useEffect Hook (at line 172) change on every render. To fix this, wrap the definition of 'setVisiblePlugin' in its own useCallback() Hook
|
Run yarn eslint:
packages/graphiql-react/src/schema.tsx#L289
React Hook useCallback has missing dependencies: 'introspectionQuery', 'introspectionQueryName', 'introspectionQuerySansSubscriptions', and 'props'. Either include them or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useCallback call and refer to those specific props inside useCallback
|
Run yarn eslint:
packages/graphiql-react/src/utility/resize.ts#L75
The 'setHiddenElementWithCallback' function makes the dependencies of useEffect Hook (at line 262) change on every render. Move it inside the useEffect callback. Alternatively, wrap the definition of 'setHiddenElementWithCallback' in its own useCallback() Hook
|
Loading