Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including react-router-prop-types with all npm packages installed. Try it out:

var reactRouterPropTypes = require("react-router-prop-types")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

react-router-prop-types v1.0.4

Runtime type checking for react-router props


Runtime type checking for react-router props


npm install react-router-prop-types --save


import React from 'react';
import ReactRouterPropTypes from 'react-router-prop-types';

class MyComponent extends React.Component {
  static propTypes = {
    // You can chain any of the above with `isRequired` to make sure a warning
    // is shown if the prop isn't provided.
    history: ReactRouterPropTypes.history.isRequired,
    location: ReactRouterPropTypes.location.isRequired,
    match: ReactRouterPropTypes.match.isRequired,
    route: ReactRouterPropTypes.route.isRequired, // for react-router-config
  render() {
    // ...
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free