@mfe-forge/core
v8.1.0
Published
Core runtime utilities for MFE Forge applications
Readme
@mfe-forge/core
Core runtime utilities for MFE Forge applications
Part of the MFE Forge framework.
Features
- Error Boundaries: Production-grade React error boundaries with reporting
- Event Bus: Typed cross-MFE communication
- Remote Loader: Dynamic loading of MFEs with fallback support
- Types: Shared types for the MFE Forge ecosystem
Installation
npm install @mfe-forge/core
# or
bun add @mfe-forge/coreUsage
Error Boundary
import { MFErrorBoundary } from '@mfe-forge/core'
;<MFErrorBoundary fallback={<div>Failed to load</div>}>
<RemoteApp />
</MFErrorBoundary>Event Bus
import { eventBus } from '@mfe-forge/core'
// Subscribe
eventBus.on('user_logged_in', (data) => {
console.log('User logged in:', data)
})
// Publish
eventBus.emit('user_logged_in', { id: '123' })License
MIT
