You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using cloneElement in a React component, passing anything to the optional props parameter causes the children of the cloned element to not render.
Here's a screenshot of the DOM rendered in the linked StackBlitz example. Notice that the div of the ClonedWithProps component is rendered but not it's children, while the ClonedWithoutProps children are rendered correctly.
The only difference between the two components is that one calls cloneElement(element, props) while the other only calls cloneElement(element)
What version of
astro
are you using?1.2.3
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Windows
Describe the Bug
When using
cloneElement
in a React component, passing anything to the optionalprops
parameter causes the children of the cloned element to not render.Here's a screenshot of the DOM rendered in the linked StackBlitz example. Notice that the
div
of theClonedWithProps
component is rendered but not it's children, while theClonedWithoutProps
children are rendered correctly.The only difference between the two components is that one calls
cloneElement(element, props)
while the other only callscloneElement(element)
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-wysfgw?file=src/pages/index.astro
Participation
The text was updated successfully, but these errors were encountered: