* Private Properties phase 1 Co-authored-by: CodingItWrong * Private fields are optional * Docs update
15 lines
281 B
JavaScript
15 lines
281 B
JavaScript
class AnchorLink extends Component {
|
|
render() {
|
|
const _this$props = this.props,
|
|
isExternal = _this$props.isExternal,
|
|
children = _this$props.children;
|
|
|
|
if (isExternal) {
|
|
return <a>{children}</a>;
|
|
}
|
|
|
|
return <Link>{children}</Link>;
|
|
}
|
|
|
|
}
|