0.1.10 • Published 1 year ago

@nathanld/single-spa-solid v0.1.10

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

single-spa-solid (inspired by single-spa-preact)

https://www.npmjs.com/package/@nathanld/single-spa-solid

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

Full documentation for Preact

Instead of:

import preact from "preact";
import rootComponent from "./path-to-root-component.js";
import singleSpaPreact from "single-spa-preact";

const preactLifecycles = singleSpaPreact({
preact,
rootComponent,
domElementGetter: () => document.getElementById("main-content"),
});

export const bootstrap = preactLifecycles.bootstrap;
export const mount = preactLifecycles.mount;
export const unmount = preactLifecycles.unmount;

do something like:

import App from "./App";
import { render } from 'solid-js/web';
import singleSpaSolid from '@nathanld/single-spa-solid';

const solidLifecycles = singleSpaSolid({
    solid: {render: render},
    rootComponent: App,
    domElementGetter: () => document.getElementById('root')
});


export const bootstrap = solidLifecycles.bootstrap;
export const mount = solidLifecycles.mount;
export const unmount = solidLifecycles.unmount;

Disclaimer: This may or may not have been generated by a GPT... Use it at your own peril.

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.0

1 year ago

0.0.1

1 year ago