React passing props, to all subcomponents does not apply to React.cloneElement

problem recovery

I have a component called < Father > that generates new data. How do I pass that data to its subcomponents? (do not know the name of the subcomponent, do not use React.cloneElement)

reasons for not using React.cloneElement

React.cloneElement copies and creates a new element. It is too inefficient when it is done many times, and I hope to find a way to pass the value directly. Ask the great god for an answer! Thank you so much!

Aug.16,2021

consider using the context function of React. All child components can access the content given by the parent component at any time


  reference  

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3de0c-2b10f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3de0c-2b10f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?