Skip to content

Conversation

@i-like-robots
Copy link
Owner

@i-like-robots i-like-robots commented May 11, 2018

Example:

function Link (props) {
  return <a href={props.url} className={props.className}>{props.children}</a>
}

function FancyLink (props) {
  return <Link {...props} className="Fancyness">{props.children}</Link>
}

function MyFancyLink (props) {
  return <FancyLink url="http://www.google.com">Fancy Google</FancyLink>
}

Output before:

<a href="http://www.google.com" class="Fancyness"></a>

Output after:

<a href="http://www.google.com" class="Fancyness">Fancy Google</a>

@i-like-robots i-like-robots added the bug Something isn't working label May 11, 2018
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 96.053% when pulling b0aec75 on support-children-as-props into 2ae71ef on master.

@i-like-robots i-like-robots merged commit 8c3ae7d into master May 11, 2018
@i-like-robots i-like-robots deleted the support-children-as-props branch May 11, 2018 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants