Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-browser-router

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-browser-router

A Router wrapper for react-router, it allows you to create multiple Routers sharing the same history.

  • 2.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

A Router wrapper for react-router, it allows you to create multiple Routers sharing the same history.

Install

npm install --save react-browser-router

Example

import React, { Component } from "react";
import { render } from "react-dom";
import { 
    BrowserRouter, 
    Route, 
    Link
} from "react-browser-router";
import Home from "./components/Home";
import About from "./components/About";
import Nav from "./components/Nav";

class NavComponent extends Component {
    render() {
        return (<BrowserRouter>
            <div>
                <Nav />
            </div>
        </BrowserRouter>);
    }
}

class ViewComponent extends Component {
    render() {
        return (<BrowserRouter>
            <div>
                <Link to="/">Home</Link>
                <Link to="/about">About</Link>

                <Route path="/" component={Home} />
                <Route path="/about" render=(props) => (<About {...props} />) />
            </div>
        </BrowserRouter>);
    }
}

render(<ViewComponent />, viewElement);
render(<NavComponent />, navElement);

Keywords

FAQs

Package last updated on 26 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc