question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Passing children as props or via varargs to h(..)

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fab1ancommented, Sep 9, 2017

Not at the moment, it’s unfinished and partly closed source, but when I get around to polish and publish I’ll tell you.

0reactions
fab1ancommented, Feb 14, 2021

No, not yet.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found