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
  • !12624

Add a loading indicator for slower connections

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/ace4port/patch-1 into main Aug 01, 2022
  • Overview 3
  • Commits 2
  • Pipelines 0
  • Changes 1

Created by: ace4port

On devices with slower connection (<4G) the initial response (this file) shows a blank white page while bundle gets loaded. Users (and even me as a developer) have experienced this and mistake the site for being unavailable/broken when actually the initial response is sent and JavaScript gets loading. This should not be the default behavior - even a simple text Loading ... with zero styling text gives some information. It does not leave me worrying if the page is broken - but that something is going on and I should wait. Adding a fancy svg loader like here does not add to file size (1.9 vs 2.3kB).

Thus something as simple as this would work fine and it will be replaced by react after load anyways.

<div id="root">
  <p> Loading ... </p>
</div>

While this not an issue when using frameworks like Next, Gatsby or Remix and the load times can be reduced with code splitting, create-react-app should come out of the box being able to be deployed.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/ace4port/patch-1