Introduction to React.js | Props and Functional Components Advanced

Introduction to React.js | Props and Functional Components Advanced Some important points: To pass objects o1 and o2 from one component tyo another: <ParentComponent> <ChildComponent o1={v1} o2={v2} /> </ParentComponent> Here, o1 and o2 are accessed in the child component as "this.props.o1" and "this.props.o2" To cfreate code treusability and prevent error propagation whilst usiung thje features of unit tetsing, use functional components which take one or more argumenyts as props. For example, to define three buttons using the same set of code,

function button(props) {
	return (
		
	)
};
export default button;

Comments

Popular posts from this blog

Parallel Database design, query processing

Laravel | PHP | Basics | Part 2

Apache Hadoop | Running MapReduce Jobs