New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

single-spa-riot

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

single-spa-riot

a single-spa plugin for riot.js applications

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

single-spa-riot

Generic lifecycle hooks for Riot.js applications that are registered as applications of single-spa.

NPM Build Status minified

Installation

npm install --save single-spa-riot

Usage

import * as Riot from 'riot';
import singleSpaRiot from 'single-spa-riot';
import App from './App.riot'

const riotLifecycles = singleSpaRiot({
  rootComponent: Riot.component(App),
  domElementGetter: () => document.getElementById('#app')
});

export const bootstrap = riotLifecycles.bootstrap;

export const mount = riotLifecycles.mount;

export const unmount = riotLifecycles.unmount;

Options

All options are passed to single-spa-riot via the opts parameter when calling singleSpaRiot(opts). The following options are available:

  • domElementGetter: (required) the callback to get root component mount element.
  • rootComponent: (optional and replaces appOptions.loadRootComponent) the root riot component.
  • loadRootComponent: (optional and replaces appOptions.rootComponent) A promise that resolves with your root component. This is useful for lazy loading.

FAQs

Package last updated on 10 Jul 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