How to pass the props to the children inside the React Component

Sometime we have to pass the props to a child component inside the parent component (Wraper component). But how to?

Make a example below to know.

Create the parent component:

In the codes above, the props of the children component is readonly, that why we have to create a new children called childrenRender with all of old children's props and we add the title prop in new children component.

When reuse the wraper component with a child component:

© 2019 4codev

Created with love by Sil.