samedi 4 novembre 2017

How to get access to props of third-party child in third-party component using react

I have my component with similar render() method:

render() {
  return (
    <div>
      <Form/>
    </div>
  );
}

The <Form> is a third-party component, so I can't simply change it's implementation, and it has some children of it's own:

<Form>
  <div>
    <Child1/>
    <Child2/>
    <Child3/>
  </div>
</Form>

where all <Child1>, <Child2> and <Child3> are also some other third-party-components.

How can I get access to properties of <Child2> from my component and set some of these during run-time in React?





Aucun commentaire:

Enregistrer un commentaire