Socket
Socket
Sign inDemoInstall

react-arbiter

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-arbiter

Recall all your modules to extend your SPA dynamically at runtime.


Version published
Weekly downloads
64
increased by6300%
Maintainers
1
Weekly downloads
 
Created
Source

React Arbiter

Build Status npm Version GitHub Tag GitHub Issues

React Arbiter provides a sets of components and utilities to recall runtime extensions to your application and to stasis third-party components to avoid crashing your application.

Getting Started

You need to have Node with NPM installed. In your repository run

npm i react-arbiter

In the simplest case you want to just use the ArbiterRecall without any loading special rendering while loading. For this use

import { ArbiterRecall } from 'react-arbiter';

function createApi(moduleMeta) {
  //create here an API object for the respective module
  return {};
}

function getModules() {
  //get a list of the available modules, potentially with content
  return fetch('/your/modules');
}

const App = (
  <ArbiterRecall createApi={createApi} getModules={getModules}>
    <YourComponent />
  </ArbiterRecall>
);

A module comes with the following interface:

interface ModuleMetadata {
  version: string;
  name: string;
  dependencies: {
    [name: string]: string;
  };
  content?: string;
  link?: string;
  hash: string;
}

This is similar to what the package.json looks like, however, containing three new elements: A hash representing the module, and either a link to the module's content (link) or the content directly (content).

(tbd)

License

react-arbiter is released using the MIT license. For more information see the LICENSE file.

Keywords

FAQs

Package last updated on 14 Jan 2019

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