React.js Props…What Are They?

Photo by Mark Basarab on Unsplash
<BabyBear />
<BabyBear color=brown />
class BabyBear extends React.Component {
constructor(props) {
super(props)
console.log(props.color)
}
}
class BabyBear extends React.Component {
constructor(props) {
super(props)
this.state.colorName = props.color
}
}

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

If you are in love with javascript, then you should know these 10 things.

React Update 2021 - TOC

Overview of React JS in 2 minutes

Overview of React Js

Most Asked CSS Interview Questions

How To Efficiently Display Data in Tables With React

a chair and a desk with keyboard, computer, and monitor on it

Use Custom Fonts in Tailwind CSS

How does Virtual DOM work?

Host React app with GitHub Page for free

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Marcus Siegel

Marcus Siegel

More from Medium

All quiet on the coding front?

A brief insight into ReactJS

Stop chasing followers and do this instead

Props in Action: Advantages of Using React