in React JS by
Q:

What are render props?

1 Answer

0 votes
by

Render Props is a simple technique for sharing code between components using a prop whose value is a function. The below component uses render prop which returns a React element.

<DataProvider render={data => (
  <h1>{`Hello ${data.target}`}</h1>
)}/>

Libraries such as React Router and DownShift are using this pattern.

Click here to read more about React JS
Click here to read more about Insurance

Related questions

0 votes
0 votes
asked Feb 23 in React JS by SakshiSharma
0 votes
asked Mar 1, 2020 in React JS by RShastri
+1 vote
asked May 29, 2020 in React JS by anonymous
0 votes
asked Dec 14, 2019 in React JS by AdilsonLima
0 votes
asked Jul 2, 2019 in React JS by Venkatshastri
0 votes
asked Mar 2, 2020 in React JS by RShastri
0 votes
...