I hereby claim:
- I am gusruss89 on github.
- I am gusruss89 (https://keybase.io/gusruss89) on keybase.
- I have a public key ASAcQJYShZAfM-0JTMWLW4L9_DT67xRY_f5DEGUKcZHZhQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import React, { useRef, useEffect, memo } from 'react' | |
import { useRouter } from 'next/router' | |
const ROUTES_TO_RETAIN = ['/dashboard', '/top', '/recent', 'my-posts'] | |
const App = ({ Component, pageProps }) => { | |
const router = useRouter() | |
const retainedComponents = useRef({}) | |
const isRetainableRoute = ROUTES_TO_RETAIN.includes(router.asPath) |