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
By default, the transition components will render a div element.
Use the as prop to render the component as a different element or as your own custom component, making sure your custom components forward refs so that Headless UI can wire things up correctly.
The problem is if I don't provide an as, it seems not to be showing up as a div (I've checked the source code to verify this; see [1] below), resulting in the following error when rendering my app.
I can solve this by passing this to the component instead.
as="div"
Which resolves the error and lets the app work properly.
I appreciate any help and/or am willing to help out with any changes if necessary
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The docs say
The problem is if I don't provide an
as
, it seems not to be showing up as adiv
(I've checked the source code to verify this; see [1] below), resulting in the following error when rendering my app.I can solve this by passing this to the component instead.
Which resolves the error and lets the app work properly.
I appreciate any help and/or am willing to help out with any changes if necessary
[1]
Beta Was this translation helpful? Give feedback.
All reactions