Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !3276

Complete server-side rendering example with React Helmet

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/cereallarceny/ssr into master Oct 12, 2017
  • Overview 3
  • Commits 2
  • Pipelines 0
  • Changes 2

Created by: cereallarceny

I've added a section in the README (both the user guide and the root) to allow for server-side rendering to be done in an unobtrusive manner. It assumes you're using a few technologies (which you may certainly sub out for others):

  • React Helmet
  • React Router v4
  • Redux and Thunk (totally optional)

The tutorial is available here. The demo repository is available here.

Please note that this demo is done entirely without running eject, nor does it require that you change anything about your create-react-app application. The only known restrictions are as follows:

  1. No code splitting.
  2. You can’t use document or window in your React application except in componentDidMount and componentWillUnmount. This is because servers don’t have access to the DOM.

I'm 100% flexible on the wording. What I put may not be sufficient in detail. Please let me know and I'll happily amend the commit.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/cereallarceny/ssr