Skip to content
This repository was archived by the owner on Feb 5, 2021. It is now read-only.
This repository was archived by the owner on Feb 5, 2021. It is now read-only.

React 15.5 moved PropTypes to separate package #7

Description

@kengorab

In versions of React newer than 15.5, PropTypes is no longer exported and has been moved to the prop-types package. Details here: https://reactjs.org/blog/2017/09/26/react-v16.0.html#packaging

The fix for this should be simple: add the prop-types package as a dependency (as is recommended by their docs) and do

import PropTypes from 'prop-types'

rather than

import { PropTypes } from 'react'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions