@allenai/varnish-react-router

An extension to Varnish for applications that use React Router.

Usage no npm install needed!

<script type="module">
  import allenaiVarnishReactRouter from 'https://cdn.skypack.dev/@allenai/varnish-react-router';
</script>

README

varnish-react-router

An extension to Varnish for applications that use React Router.

Usage

First install the package:

yarn add @allenai/varnish-react-router

Then you can use it like so:

import { ThemeProvider } from '@allenai/varnish';
import { Link } from '@allenai/varnish-react-router';
import '@allenai/varnish/varnish.css';

const App = () => (
  <ThemeProvider>
    <Link to="/some/path">Click Here</InternalLink>
  </ThemeProvider>
);

See: Varnish documentation for more example usage.

Contributing

Examples of this library are shown in the Varnish Demo. You can utilize the root Varnish Monorepo Docker setup by running docker-compose up --build. From there you will be able to see demos at https://localhost:8080/components/varnish-react-route

Publishing

See instructions at the monorepo root README

Getting Help

If you're stuck don't hesitate to reach out:

We're eager to improve varnish and need your feedback to do so!