
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@feature-hub/core
Advanced tools
@feature-hub/core is a package that provides a framework for building micro frontends. It allows developers to create and manage feature apps, which are independent, self-contained units of functionality that can be integrated into a larger application.
Creating a Feature App
This code demonstrates how to create a simple feature app using @feature-hub/core. The feature app is defined with an ID and a create function that returns an object with a render method.
const {createFeatureAppDefinition} = require('@feature-hub/core');
const myFeatureApp = createFeatureAppDefinition({
id: 'my-feature-app',
create: () => ({
render: () => '<div>Hello, Feature Hub!</div>'
})
});
Integrating Feature Apps
This code shows how to integrate a feature app into a feature hub. The feature hub is created with a feature app manager and a feature service registry, and the feature app is registered with the feature app manager.
const {createFeatureHub} = require('@feature-hub/core');
const featureHub = createFeatureHub({
featureAppManager: {},
featureServiceRegistry: {}
});
featureHub.featureAppManager.registerFeatureApp(myFeatureApp);
single-spa is a framework for building micro frontends, similar to @feature-hub/core. It allows multiple frameworks to coexist in a single application, enabling independent deployment and development. Compared to @feature-hub/core, single-spa provides more flexibility in terms of framework integration but may require more configuration.
qiankun is a micro frontend framework based on single-spa, designed to make it easier to use. It offers a more opinionated approach with built-in features for handling common micro frontend challenges. Compared to @feature-hub/core, qiankun provides a more streamlined experience but may be less flexible for custom use cases.
Create scalable web applications using micro frontends.
Allows dynamic loading of micro frontends, lifecycle management of micro frontends, and controlled sharing of state and functionality between micro frontends.
yarn add @feature-hub/core
npm install @feature-hub/core
Copyright (c) 2018-2024 Accenture Song Build Germany GmbH. Released under the terms of the MIT License.
3.7.0 (2024-09-03)
FAQs
Create scalable web applications using micro frontends.
The npm package @feature-hub/core receives a total of 78,632 weekly downloads. As such, @feature-hub/core popularity was classified as popular.
We found that @feature-hub/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.