react-intro | En workshop for folk som vil lære React | Learning library
kandi X-RAY | react-intro Summary
kandi X-RAY | react-intro Summary
En workshop for folk som vil lære React
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-intro
react-intro Key Features
react-intro Examples and Code Snippets
Community Discussions
Trending Discussions on react-intro
QUESTION
I am following a React tutorial here. In the fourth lesson it has me create a App.propTypes
section. When I run the code React gives me a error saying TypeError: Cannot read property 'string' of undefined
when I open up my console the error says React.PropTypes is deprecated since React 15.5.0, use the npm module prop-types instead
. I then went ahead and installed the npm package prop-types and imported it in my code, but I still end up with the same error. I will include my code below.
I am using node version v8.5.0. Maybe I should try and find out what version of node the tutorial is using so my React version matches up, but I don't even know if I can find that out, I wish tutorials would specify these sorts of things, it looks like this tutorial is 2 years old, which is probably why I am having this discrepancy.
src/app.js
...ANSWER
Answered 2017-Oct-04 at 16:32If you're using the prop-types package, you can do this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-intro
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page