react-router-prop-types
Runtime type checking for react-router props
Installation
npm install react-router-prop-types --save
Usage
import React from 'react';import ReactRouterPropTypes from 'react-router-prop-types'; 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: ReactRouterPropTypeshistoryisRequired location: ReactRouterPropTypeslocationisRequired match: ReactRouterPropTypesmatchisRequired route: ReactRouterPropTypesrouteisRequired // for react-router-config { // ... }