@ng-mfe/shared-state

v0.1.1

Published

Cross-application shared state management

Readme

@ng-mfe/shared-state

用于微前端应用的跨应用共享状态管理。

安装

npm install @ng-mfe/shared-state

用法

import { SharedStateStore } from '@ng-mfe/shared-state';

const store = new SharedStateStore();
store.set('user', { name: 'Alice' });
store.subscribe('user', event => console.log(event.value));

API 接口

  • SharedStateStore — 键值响应式状态存储
  • installDevTools — 浏览器开发工具集成

文档

查看主 README 获取完整文档。