New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@appshell/react

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appshell/react

React utilities for building micro-frontends with Appshell and Module Federation

latest
Source
npmnpm
Version
0.4.0
Version published
Maintainers
0
Created
Source
appshell

Appshell CI

@appshell/react

React utilites for building micro-frontends with Webpack Module federation and Appshell.

Working examples can be found here.

Getting Started

To begin, you'll need to install @appshell/react:

npm install @appshell/react --save-dev

or

yarn add -D @appshell/react

or

pnpm add -D @appshell/react

AppshellComponent

React component that dynamically loads Appshell components.

import { AppshellComponent, ManifestProvider } from '@appshell/react';

<App>
  <ManifestProvider manifest={manifest}>
    <AppshellComponent remote="PingModule/Ping">
    <AppshellComponent remote="PongModule/Pong">
  </ManifestProvider>
</App>

useGlobalConfig

For access to the global appshell config.

import { GlobalConfigProvider, useGlobalConfig } from '@appshell/react';

const MyComponent = () => {
  const config = useGlobalConfig();

  ...
}

<RegistryProvider config={config}>
  <MyComponent />
</RegistryProvider>

useManifest

For access to the manifest.

import { ManifestProvider, useManifest } from '@appshell/react';

const MyComponent = () => {
  const manifest = useManifest();

  ...
}

<ManifestProvider manifest={manifest}>
  <MyComponent />
</ManifestProvider>

Where does the registry come from?

Currently, the registry is a shared directory or mounted volume. It does support calling an http endpoint, but it has not yet been implemented.

See @appshell/cli

Each micro-frontend registers its manifest with the registry

appshell register --manifest dist/appshell.manifest.json

Keywords

module federation

FAQs

Package last updated on 24 Sep 2024

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