react-weui 学习笔记
🌙
手机阅读
本文目录结构
react-weui
官方资料
安装
使用npm:
如果未安装React
npm install --save react react-dom
npm install --save weui@1.1.0 react-weui
安装了React
npm install weui@1.1.0 react-weui --save
使用开发版本(API might changes on realese version)
npm install react-weui@alpha --save
使用浏览器(CDN由unpkg)
Javacript
https://unpkg.com/react-weui@1.1.2
CSS
https://unpkg.com/react-weui@1.1.1/build/dist/react-weui.css
例子
我们在文档中有几个示例。这是让您入门的第一个:
// app.js
import React from 'react';
import ReactDOM from 'react-dom';
import { Button } from 'react-weui';
//import styles
import 'weui';
import 'react-weui/build/packages/react-weui.css';
const App = () => <Button>hello wechat</Button>;
ReactDOM.render((
<App/>
), document.getElementById('container'));