Socket
Socket
Sign inDemoInstall

react-router-prop-types

Package Overview
Dependencies
6
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-router-prop-types

Runtime type checking for react-router props


Version published
Weekly downloads
34K
increased by5.19%
Maintainers
1
Install size
167 kB
Created
Weekly downloads
 

Readme

Source

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';

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() {
    // ...
  }
}

Keywords

FAQs

Last updated on 01 Sep 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc