@aliretail/react-store-marketing-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.4.4 • Public • Published

aliretail-store-marketing-sdk -- @aliretail/react-store-marketing-sdk

aliretail-store-marketing-sdk

开发环境依赖

node > 12

开发调试

项目调试: fie start
文档调试: fie start --doc

新增页面

fie add

设置页面渲染 props

  • 完成了页面 sdk 代码开发后,需要执行一次 registerPage

    // 第二个参数表示组件的别名
    registerPage(Page, 'demo2');
  • 然后修改public/index.html中的window.pageConfig就可以在调试时给页面 SDK 传入 props 了

    window.pageConfig = {
      demo2: {
        name: '007',
      },
    };

发布

fie publish

使用

import React from 'react';
import ReactDOM from 'react-dom';
import Page from '@aliretail/react-store-marketing-sdk/build/lib/demo2';

ReactDOM.render(<Page name="my name" />, document.getElementById('container'));

Readme

Keywords

none

Package Sidebar

Install

npm i @aliretail/react-store-marketing-sdk

Weekly Downloads

3

Version

1.4.4

License

none

Unpacked Size

995 kB

Total Files

212

Last publish

Collaborators

  • aliretail