
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@ivliu/micro-page
Advanced tools
micro-page是一款基于history package实现的类spa工具,配合postmessage可以轻松实现多页面之间的数据通信。 micro-page同时支持iframe形式和react component组件形式嵌入,且内置缓存,保证页面的切换流畅
micro-page是一款基于history package实现的类spa工具,配合postmessage可以轻松实现多页面之间的数据通信。 micro-page同时支持iframe形式和react component组件形式嵌入,且内置缓存,保证页面的切换流畅
我们平时开发中多页面如果有数据通信,需要借助localstorage或者sessionstorage,并且需要做多端兼容处理,比如微信返回缓存问题,借助micro-page你可以在多页面之间实现类spa的体验
yarn add micro-page
This is the folder structure we set up for you:
import 'react-app-polyfill/ie11';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import MicroPage from '../.';
import useSingleHistory from '../src/useSingleHistory';
import Comp from './Comp';
const App = () => {
const h = useSingleHistory('BrowserHistory');
return (
<div>
<button onClick={() => h.push('/comp')}>push</button>
<MicroPage
portalId="#portal"
routes={[
{ title: '百度', path: '/baidu', url: 'https://www.baidu.com' },
{ title: '新浪', path: '/sina', url: 'https://www.sina.com' },
{ title: '自定义组件', path: '/comp', component: Comp }
]}
/>
</div>
);
};
ReactDOM.render(<App />, document.getElementById('root'));
{
portalId: string; // 挂载到的容器,如果不存在会新建
routes: TRoute[]; // 声明式路由
onDestroyClose?: () => void; // 暂未实现,可能废弃
}
FAQs
micro-page是一款基于history package实现的类spa工具,配合postmessage可以轻松实现多页面之间的数据通信。 micro-page同时支持iframe形式和react component组件形式嵌入,且内置缓存,保证页面的切换流畅
We found that @ivliu/micro-page demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.