Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to pass props to another component


//parent component which send the prop value
const parent=(val)=>{
	return <Children value={val}/>;
}
//child component which recive the prop value
export const Children=(props)=>{
	return props.value;
}
 
PREVIOUS NEXT
Tagged: #pass #props #component
ADD COMMENT
Topic
Name
2+1 =