Skip to content

Commit 3579a4c

Browse files
committed
lint rules of hooks
1 parent 9926ac4 commit 3579a4c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/react-router/src/Match.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,13 @@ function OnRendered() {
247247
return null
248248
}
249249

250-
// eslint-disable-next-line react-hooks/rules-of-hooks
251-
// @ts-expect-error -- init to `undefined` but don't write `undefined` to shave bytes
252250
// Track the resolvedLocation as of the last render so that onRendered can
253251
// report the correct fromLocation. By the time this effect fires,
254252
// resolvedLocation has already been updated to the new location by
255253
// Transitioner, so we cannot use router.stores.resolvedLocation.get()
256254
// directly as the fromLocation.
255+
// @ts-expect-error -- init to `undefined` but don't write `undefined` to shave bytes
256+
// eslint-disable-next-line react-hooks/rules-of-hooks
257257
const prevResolvedLocationRef = React.useRef<
258258
ParsedLocation<any> | undefined
259259
>()

0 commit comments

Comments
 (0)