1.0.3 • Published 5 years ago

@ampa/nextjs-router v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@ampa/nextjs-router

Plugin for @ampa/core to use with nextjs-router

Install

yarn add @ampa/nextjs-router

Example

import { PageTransition } from '@ampa/core' // the core component
import { createUseNextRouter } from '@ampa/nextjs-router' // one of the hooks for different routers
...
  <PageTransition
    useRouter={createUseNextRouter()}
    timeout={{ enter: 900, exit: 900 }}
    routeAnimations={routeAnimations}
  >
    <Component {...pageProps} />
  </PageTransition>

Requirements

React 16.8 and higher