How do I use react-albus with Reach Router

173 Views Asked by At

In my Gatsby app, I want to use a react-albus wizard with Reach Router. Here's the example form react-albus documentation on how to use it with React Router, but I don't know how to modify that to work with Reach Router. Any help would be appreciated.

Internally, React Albus uses history to maintain the ordering of steps. This makes integrating with React Router (or any other router) as easy as providing with history and basename props.

import React from 'react';
import { Route } from 'react-router-dom';
import { Wizard } from 'react-albus';

const RoutedWizard = ({ children }) =>
  <Route
    render={({ history, match: { url } }) =>
      <Wizard history={history} basename={url}>
        {children}
      </Wizard>}
  />;

export default RoutedWizard;
0

There are 0 best solutions below