Universal React Redux Registration
  • Getting Started
  • Backend Project architecture
  • Frontend Project architecture
  • Clone the repository
  • Set-up the Backend
  • Set-up the Frontend
  • JSON Web Tokens
  • Server & Client Bundles
  • Unit tests
  • Create new pages
  • Restrict Access (Authenticated Users Only)
  • Redux-Form
  • Custom Layouts
  • Custom Page titles and SEO
  • SCSS
  • Fonts & Font Icons
  • Images
Powered by GitBook
On this page

Custom Page titles and SEO

We use a package called ‘helmet’ to set custom page titles and add meta tags on pages within our app.

Open the page component you wish to add custom page title and import the package

import { Helmet } from 'react-helmet';

Create a new method and define your page title and a custom body class

head() {
    return (
        <Helmet bodyAttributes={{ class: "myClassName" }}>
            <title>My new page title</title>
        </Helmet>
    );
}

Call this method anywhere within your return statement

render() {
return (
    <div className="grid pageHeaderSection">
        {this.head()} <<-- We are calling it here
        <div className="column column_12_12">
            <div className="content_wrap">
                <h2>Users</h2>
                <p className="desc">
                    Lorem Ipsum is simply dummy text…

PreviousCustom LayoutsNextSCSS

Last updated 6 years ago