-
-
Notifications
You must be signed in to change notification settings - Fork 985
Open
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
Milestone
Description
Describe the bug
I have this component:
function Div(props) {
return (
<div {...props}/>
)
}
And I use it like this:
<Div id="hello" ref={el => console.log('id', el.id)}>Div</Div>
Your Example Website or App
https://stackblitz.com/edit/solidjs-templates-edibnb?file=src%2FApp.jsx
Steps to Reproduce the Bug or Issue
Use the Div
component and look at the console output. It shows:
id <empty string>
Expected behavior
I expected to have access to the element's attributes, e.g. id
. Instead, I seem to get default attributes ("" instead of "hello").
Screenshots or Videos
No response
Platform
- OS: Windows
- Browser: Firefox
- Version: 120.0.1
Additional context
Workaround: Wrap the ref
inside onMount()
.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested