background:
I want to experience the features of the new version of react these days, so I want to update the react of the project to version 16.
problem
react is updated to 16.4, React.PropTypes
is discarded, and after the project is run, it is found that only react-router, in node_modules uses React.PropTypes
to manually change React.PropTypes
to
import PropTypes from "react-types"
PropTypes
? Or to upgrade react-router to 4.X, I tried to upgrade react-router2.X to react-router4.X, yesterday, but my ability was limited, and I haven"t done it for a day and a half, so let"s ask you how to get it done.