Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-fast-mount

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-fast-mount

High order component to fast mount slow renderering React components for improved app responsiveness.

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

React Fast Mount

Demo website (demo code on the gh-pages branch)

Fast mount slow loading components for improved responsiveness and perceived performance. This allows a site to respond instantly to user input, even if it is to show a blank screen while the component is loading, so the site is perceived as fast and responsive.

The difference is most noticeable on mobile devices, especially slower devices.

Usage

React Fast Mount is a high order component (HOC) - just wrap your component in the Fast Mount function before export, e.g. export default fastMount(MyComponent);.

$ yarn add react-fast-mount
# OR
$ npm install --save react-fast-mount
import React from 'react';
import fastMount from 'react-fast-mount';

class MyComponent extends React.Component {
  ...
  render() {
    ...
  }
}

// wrap your component in fastMount to fast mount it
export default fastMount(MyComponent);

//  OR

// you can optionally provide a ReactElement as a second argument to use as a container
// for MyComponent - the container will be rendered on the first render (fast),
// and then MyComponent will be rendered inside of it on the second render
export default fastMount(MyComponent, <div style={{ height: '200px' }} />)

Keywords

FAQs

Package last updated on 11 Sep 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc