What are render props in React.js?

Answer

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.

All react js Questions

Ask your interview questions on react-js

Write Your comment or Questions if you want the answers on react-js from react-js Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---