For any suggestions regarding blogs any help in technology you can reach me on
designcode546@gmail.com
Get link
Facebook
X
Pinterest
Email
Other Apps
Comments
Popular posts from this blog
ReactJS - Props Overview The main difference between state and props is that props are immutable. This is why the container component should define the state that can be updated and changed, while the child components should only pass data from the state using props. Using Props When we need immutable data in our component, we can just add props to reactDOM.render() function in main.js and use it inside our component. App.jsx import React from 'react' ; class App extends React . Component { render () { return ( <div> <h1> { this . props . headerProp }</ h1 > <h2> { this . props . contentProp }</ h2 > </ div > ); } } export default App ; main.js import React from 'react' ; import ReactDOM from 'react-dom' ; import App from './App.jsx' ; ReactDOM . render (< App headerProp = "Header from props..." ...
Comments
Post a Comment