I need to access 'GreatGrandChild' component in the 'View' component.
View Component:
<View>
<Child>
....
</Child>
</View>
Child Component:
<Child>
<GrandChild>
....
</GrandChild>
</Child>
GrandChild component:
<GrandChild>
<GreatGrandChild>
....
</GreatGrandChild>
</GrandChild>
GreatGrandChild component:
<GreatGrandChild ref={(component) => { this.component = component; }}>
....
</GreatGrandChild>
How do I access the 'GreatGrandChild' component in the 'View' component? Can I access it using refs? Which lifecycle method would be most appropriate in that case?