I can pass something like this fine:
<CardTitle title={this.props.post.title} subtitle={
<Link to={this.props.post.author}>{this.props.post.author}</Link>
} />
But I need to pass both a component and some string text, but doing this doesn't work:
<CardTitle title={this.props.post.title} subtitle={(`
This is a link: ${<Link to={this.props.post.author}>{this.props.post.author}</Link>}
`)} />
What's the right syntax for this?
Try passing it as a React Element altogether, not as a string:
Then should be able to render
subtitle
as is. If you're using React >16, you might want to use Fragments for this: