扫一扫分享
direflow使用react创建快速、高性能的原生Web 组件。
npm i -g direflow-cli
创建一个新的 Direflow 组件
direflow create
这将为您引导一个新的 Direflow 组件。现在使用以下命令:
cd <project-folder>
npm install
npm start
您的 Direflow 组件将开始运行localhost:3000,您的浏览器将打开一个新窗口
import { DireflowComponent } from 'direflow-component';
import App from './direflow-component/App';
DireflowComponent.create({
// React component to use
component: App,
// Configuration - tagname of the custom element
configuration: {
tagname: 'crypto-cart',
}
});
手机预览