0

i have

<Row> <Col width={50} > <img src="some img" /> </Col> </Row>

I want that Img component should get component width.

note:- in this all the components are dynamically generated and lots of and component will be there so react context wont work out.

Yossi
  • 5,577
  • 7
  • 41
  • 76
  • There is now way without prop drilling our using a state manager. check this: https://stackoverflow.com/questions/40418240/reactjs-how-a-child-access-its-parents-props – Mahdi Aryayi Jan 06 '21 at 09:33
  • by using javascript recursive parent check we can get , but i need better solution then that . – Naresh vadlamani Jan 06 '21 at 09:43

0 Answers0