ola-ui-jd
v1.10.9
Published
ola-ui 的 jd 业务组件层。
Downloads
24
Readme
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 />;
}
}