DEV Community

Harish raj
Harish raj

Posted on

4/11/26 in paiyalagam (props in react)

syntax :
import parent
function parent (){
let amount =10000; ------------->send
return(

parent { childmat={amount}/>

import child
function child (props){
console.log(props.amt)
return(

child{props.amt}
---------------->receive

)
}
export default child
          |
Enter fullscreen mode Exit fullscreen mode

return ( V
object more than one value is object so use {{value}} in expection function . send the function file to file

child {{amount.setamount}}.
|
V
expreaction function

Top comments (0)