ola-ui-jd

1.10.9 • Public • Published

ola-ui-jd

ola-ui 的 jd 业务组件层。

Install

yarn add ola-ui-jd

DEV

yarn build  ## 打包 
 
yarn dev  ## 打包 (watch 模式) 

Quick Start

添加 reducer

import {combineReducers} from 'redux-immutable';
import {reducers as olaReducers} from 'ola-ui-jd';
 
export default combineReducers({
  
  // ...,
 
  olaReducers,
 
  // ...,
});

添加 saga

import {all, fork} from 'redux-saga/effects';
import {sagas as olaSagas} from 'ola-ui-jd';
import createSagaMiddleware from 'redux-saga';
 
export function* initSagas() {
  yield all([
    // ...,
    fork(olaSagas),
    // ...,
  ]);
}
 
// run saga middleware with sagas
const sagaMiddleware = createSagaMiddleware();
sagaMiddleware.run(initSagas);

调用组件

import React, {Component} from 'react';
import {SomeComponent} from 'ola-ui-jd';
 
export default class MyComponent extends Component {
 
  render() {
    return <SomeComponent />;
  }
 
}

Readme

Keywords

Package Sidebar

Install

npm i ola-ui-jd

Weekly Downloads

0

Version

1.10.9

License

MIT

Unpacked Size

264 kB

Total Files

94

Last publish

Collaborators

  • pengzhanlee