Passing children as props or via varargs to h(..)
See original GitHub issueI’m writing a Kotlin-DSL wrapper for preact (Using Type-Safe Builders. When it comes to statically known children, is it better to
- Pass them via varargs as third parameter
- Pass them as
.children
property - Or does it not matter?
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
How to pass props to {this.props.children} - Stack Overflow
Cloning children with new props. You can use React.Children to iterate over the children, and then clone each element with new props (shallow...
Read more >Warning: Each Child in a List Should Have a Unique 'key' Prop
When creating a list in the UI from an array with JSX, you should add a key prop to each child and to...
Read more >React Props - W3Schools
Props are arguments passed into React components. Props are passed to components via HTML attributes. props stands for properties.
Read more >React Children: The misunderstood prop - Netlify
Let's go through step by step why children are weird, so you can understand them better. Again: React children. Not humans. Children are...
Read more >Passing State of Parent to Child Component as Props
React enables developers to write reusable code in the form of components. This modular approach makes it simple to develop robust apps by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not at the moment, it’s unfinished and partly closed source, but when I get around to polish and publish I’ll tell you.
No, not yet.