GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Bug: react-hooks/exhaustive-deps does not accept readonly arrays as deps · Issue #25844 · react/react Closed Labels DescriptionReact version: Steps To Reproduce
const useExample = ({ value, callback }: { value: number; callback: (value: number) => void }) => { useEffect( () => { callback(value); }, // In the next line, the const assertion makes the react-hooks/exhaustive-deps rule to emit an error [value, callback] as const ); }; The current behaviorESLint emits an error: At the same time, // node_modules/@types/react/index.d.ts type DependencyList = ReadonlyArray<any>; function useEffect(effect: EffectCallback, deps?: DependencyList): void; The The expected behaviorThe RationaleA strongly typed I'm going to take a look myself once I have a slack time (it should not be complex: something like checking the Activity
MetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |