🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

lazy-route

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lazy-route

Lazy / async route loading for React Router 4

1.0.7
latest
Source
npm
Version published
Weekly downloads
67
1.52%
Maintainers
1
Weekly downloads
 
Created
Source

lazy-route - Lazy route loading for React Router 4 through System.import

Dependencies and requirements

This component only works with React Router 4 and Webpack 2 (because of System.import).

Usage

Installation:

npm install lazy-route or yarn add lazy-route

How to use with React Router 4:

import {Match} from 'react-router'
import LazyRoute from 'lazy-route'

<Match 
  pattern="/myroute"
  render={(props) => <LazyRoute {...props} component={import('./myComponent')} />}
/>

Upcoming features

The component works, but I have yet to add tests and some polish to it, the plan is to add a customizable loader etc.

Keywords

react-router

FAQs

Package last updated on 30 Dec 2016

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