I have Three components like Main.js is the parent components Main.js has two different class components like Employee.js and EmployeeAddress.js.
Both components called from Main.js. I can access parent Main.js properties values from Employee.js as well as EmployeeAddress.js.
I want to get the details from Employee.js properties values to EmployeeAddress.js
For ex. I want to display EmployeeName value into EmployeeAddress.js. if modified EmployeeName textbox value from Employee.js
export default class Main extends React.Component {
constructor(props){
super(props)
}
render(){
return(
<Employee />
<EmployeeAddress />
);
}
I want to pass values from Employee.js to EmployeeAddress.js Note : Both components are different not having parent and child relationships.