![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
react-load-screen
Advanced tools
A React loading screen. Сan be used as a screen saver for the initial download of the application or as an overload screen for promises.
npm install --save react-loading-screen
The modular approach of this library means you're much better off building it into your code with a module bundling system like browserify or webpack.
Basically IE9+.
const LoadingScreen = require('react-loading-screen');
// ... or with es2015
import LoadingScreen from 'react-loading-screen';
Library uses styled components, so follow official docs to configurate, it`s very simple, go to instructions
For details about why the examples work, read the API documentation below.
You can also see full code of demo by looking in example/
.
import React from 'react'
//...
import LoadingScreen from '../react-loading-screen'
//...
<LoadingScreen
loading={true}
bgColor='#f1f1f1'
spinnerColor='#9ee5f8'
textColor='#676767'
logoSrc='/logo.png'
text='Here an introduction sentence (Optional)'
>
// ...
// here loadable content
// for example, async data
//<div>Loadable content</div>
</LoadingScreen>
module is represented by a single component, let's call it LoadingScreen, import as shown above
LoadingScreen
Root component, it includes three subcomponents, you can control them through properties
some of props are REQUIRED, if not mentioned prop is OPTIONAL.
loading { bool }: the content of the page is loaded or not (required parameter).
bgColor { string }: background color of loading sreen. deault #ffffff
.
spinnerColor { string }: spinner color. If empty param - not showing.
textColor { string }: text under spinner. default #676767
.
logoSrc { string }: url of image. If empty param - not showing.
text { string }: background color of loading sreen. If empty param - not showing.
FAQs
Loading screen example for react
The npm package react-load-screen receives a total of 2 weekly downloads. As such, react-load-screen popularity was classified as not popular.
We found that react-load-screen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.