rsnext/examples/active-class-name
2020-08-29 22:32:35 -04:00
..
components updated active-class-name example to also demo a [slug] path (#15924) 2020-08-06 01:26:48 +00:00
pages updated active-class-name example to also demo a [slug] path (#15924) 2020-08-06 01:26:48 +00:00
.gitignore Added .gitignore to examples that are deployed to vercel (#15127) 2020-07-16 10:52:23 -04:00
package.json Ensure all examples are MIT licensed (#16691) 2020-08-29 22:32:35 -04:00
README.md Simplify example usage instructions (#16678) 2020-08-29 22:22:02 -04:00

activeClassName example

ReactRouter has a convenience property on the Link element to allow an author to set the active className on a link. This example replicates that functionality using Next's own Link.

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example active-class-name active-class-name-app
# or
yarn create next-app --example active-class-name active-class-name-app

Deploy it to the cloud with Vercel (Documentation).