I will try to explain what I want. Trying to make something like Formik. I want something like this:
<Parent>
{(someData)=>(
<>
{console.log(someData)}
</>
)}
</Parent>
Parent component have children prop. How to pass this someData from Parent component?
Parent component is:
const Parent =({children})=>{
const value='Pass to children';
return ({children})
}
How to pass this value through children porp?
Like on this link:https://formik.org/docs/guides/react-native