🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

react-router-express

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router-express

React Router Express Location - Server Side Rendering (isomorphic)

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

React Router Express Location - Server Side Rendering (isomorphic)

// server.js

import express from 'express';
import ExpressLocation from 'express-location';
import ReactRouter from 'react-router';

import routes from './routes';


const server = express();

server.use(function (req, res, next) {
  const location = new ExpressLocation(req.url, res);

  ReactRouter.run(routes, location, (Handler, state) => {
    if (location.redirect()) return;
    
    // ...
  });
})

Keywords

react-router

FAQs

Package last updated on 16 Mar 2015

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