I have a page on my site which fetches data from the database to render a list of links that I want google to index. The page looks something like this:
class Example extends Component {
render() {
const {items} = this.props;
return <div className="centeredPage">
<div className="content">
<p>This is some static text.</p>
{items.map(item=> {
return <Link
url={ item.url }
key={ item._id }
>{item.name}</Link>
})}
</div>
</div>
}
}
export default withTracker(() => {
Meteor.subscribe('items');
return {
items: Items.find().fetch(),
}
})(Example);
I would like to use server-render to render this page from the server and return the full page (including the links) once they are fetched from the database. Is this possible using the server-render package, and if so, how is it done?