Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 775 Bytes

README.md

File metadata and controls

41 lines (33 loc) · 775 Bytes

This project shows how there is a flash of unstyled content when a rendered element depends on CSS set by react-helmet.

You can run the app yourself using yarn start (or npm run start).


Given app code:

import React, { Component } from 'react';
import Helmet from 'react-helmet'

class App extends Component {
  render() {
    return (
      <div>
        <Helmet
          style={[{
            cssText: `
              .message {
                text-align: center;
                font-size: 48px;
                color: magenta;
              }
            `
          }]}
        />
        <p className="message">
          Hello World!
        </p>
      </div>
    );
  }
}

export default App;

You will see this one first load.