@vtaits/react-router-dom-fake-browser
v1.0.0
Published
Embeddable fake browser for react applications based on react-router-dom
Downloads
19
Maintainers
Readme
@vtaits/react-router-dom-fake-browser
Embeddable fake browser based on MemoryRouter
from react-router-dom
Installation
yarn add @vtaits/react-router-dom-fake-browser styled-components
Examples
Usage
import {
Browser,
} from '@vtaits/react-router-dom-fake-browser';
import {
Route,
Link,
} from 'react-router-dom';
...
<Browser>
<Route
path="/index/"
render={() => 'Hello world'}
/>
<Link
to="/notindex/"
>
Go
</Link>
</Browser>
Advanced usage
Providing props to MemoryRouter
<Browser
initialEntries={['/one', '/two', '/three']}
initialIndex={1}
>
Helo
</Browser>