Skip to content

Instantly share code, notes, and snippets.

@astrotim
Last active December 29, 2017 11:21
Show Gist options
  • Save astrotim/d055cd07958c5bf0378ac10395688b6f to your computer and use it in GitHub Desktop.
Save astrotim/d055cd07958c5bf0378ac10395688b6f to your computer and use it in GitHub Desktop.
added page title with react-helmet
import React from 'react';
import { createClient } from 'contentful';
+import Helmet from 'react-helmet';
return (
<React.Fragment>
+ <Helmet title={this.state.data.title} />
<h1>{this.state.data.title}</h1>
{this.state.data.content}
</React.Fragment>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment