Skip to content

Prevent flash of 'undefined' when page loads? #49

@CaptainChemist

Description

@CaptainChemist

When my webpage loads I briefly get a flash of 'undefined' before the page loads. This flash happens over a fraction of a second. Is there a way just to remove the 'undefined'? I am not worried about the wait at all just the text. My SSR.ReactRouterRun looks like this:

ReactRouterSSR.Run(
  Routes,
  {
    props: {
      htmlHook(html) {
        const head = Helmet.rewind();
        html = html.replace('<head>', `<head>${head.title}${head.base}${head.meta}${head.link}${head.script}`);
        return html;
      },
    },
  },
  {
    htmlHook(html) {
      const head = Helmet.rewind();
      html = html.replace('<head>', `<head>${head.title}${head.base}${head.meta}${head.link}${head.script}`);
      return html;
    },
  }
);

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions