@ajaychaudhari599

To send data from a child component to a parent component in React, you can use a callback function. The parent component passes a function as a prop to the child component, and the child component invokes that function with the data it wants to send.

@avd_suresh

1. Create a function in the parent component which must have the state which is getting updated from the child
2. Context api
3. Redux statemangement

@sivachaitanyaprasad2898

1) useContext
2) Redux state management 
3) usecallback
4) through props

@arvindganji1287

Function parent() {
Return <child name="hello">
}
Function child(props) {
Return<p >welocom, {props.name}<p/>
}

@suramshivakrishna6951

Function mycompo(){
     Return<child name ="react">
}
function child (props){
Return<h1>this is ,{props.name}<h1/>
}

@MadhuSudhanC-oc7ry

By defining a function in the parent and passing that as a prop to child then in child component we invoke the function by passing data to the function call

@Niamudeen

1. Lifting state using callbacks
2. Context api -- global state
3. Solutions like redux or zustand -- global state

@prasadpol8205

Using Context API, using Redux

@amerinpal2279

With function props. Just send data as parameter. With function prop the state of the parent can be managed from child components.

@saibhaskar6939

1.prop drilling 
2.context api

@Rahul-tg6nh

You can use hooks like useContext or useState or call back functions

@rkprojects6143

Using chatgpt

@Komshe

Define a function in parent who takes parameter which in turn updates something based on paramater value change. Now pass this function as prop to child. Child updates parameter and hence we send data from child to parent.

@sivachaitanyaprasad2898

Use the callback function

@deepaksharma-n4i

We can achieve that by using callbacks

@sujitprasadkushwaha9031

We can create use either context or we could use the react forward ref and imperative hook of react.

@saiteja-jc5lm

by using context

@devendra_Selokar04

By using context api

@shreeyadav9064

By using state