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

@centarius/react-loadable

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@centarius/react-loadable

React Loadable HOC for Centarius

  • 0.1.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@centarius/react-loadable npm

React Loadable plugin for centarius.

- !! THIS IS JUST A STUB, NOT YET IMPLEMENTED !! -

Introduction

Centarius React Loadable is just like Centarius State-HOC.

Its own purposes are to reduce boilerplate in your render function AND pass LoadingComponent and ErrorComponent respectively to React Loadable instances.

What does it mean?

It means that we can use same LoadingComponent and Error Component for both fetching initial data / props or loading split files

Install

$ npm install --save-dev @centarius/react-loadable

OR

$ yarn add @centarius/react-loadable

API (CAN BE CHANGED IN THE FUTURE)

TL;DR All static methods will be hoisted

centariusReactLoadable: (options: ReactLoadableOptions) => ReactLoadableComponent

See this link for more options

Usage

import centariusReactLoadable from '@centarius/react-loadable';
import LoadingComponent from './Loading';
import ErrorComponent from './Error';

export default centariusReactLoadable({
  loader: () => import('./index'),
  ...rest,

  // both this options will be passed onto loading properties in ReactLoadable
  // it means loading will be overriden by these two
  LoadingComponent,
  ErrorComponent,
});

Support

Any issues or questions can be sent to the centarius monorepo.

Please be sure to specify that you are using @centarius/react-loadable.

License

MIT © Ray Andrew

Keywords

FAQs

Package last updated on 29 Aug 2018

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