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

react-dynamic-remote-component

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dynamic-remote-component

Allows you to dynamically load a component from a remote using webpack 5's module federation.

  • 0.0.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
254
decreased by-17.8%
Maintainers
1
Weekly downloads
 
Created
Source

react-dynamic-remote-component

Allows you to dynamically load a component from a remote using webpack 5's module federation. Created based on @ScripteAlchemy's (Module Federation's creator, Zack Jackson) dynamic-system-host example

Motivation

With basic settings of module federation, url for a remote module needs to be specified during build-time. However, in some cases, it might be necessary to be able to specify remote module urls during runtime. This package allows you to load remote modules in general and React components from remotes that are specified during runtime.

Installation

npm install react-dynamic-remote-component --save

or

yarn add react-dynamic-remote-component

RemoteComponent Usage

remote component usage

useRemoteModule Usage

remote module usage

Please keep in mind, any component taking advantage of useRemoteModule should be wrapped with React.Suspense

Keywords

FAQs

Package last updated on 30 Mar 2023

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