https://github.com/jdf2e/rockact-yep-react
yep-react demo project bootstrapped with rockact.
https://github.com/jdf2e/rockact-yep-react
Last synced: about 1 year ago
JSON representation
yep-react demo project bootstrapped with rockact.
- Host: GitHub
- URL: https://github.com/jdf2e/rockact-yep-react
- Owner: jdf2e
- Created: 2019-07-17T06:16:34.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-10-16T01:53:57.000Z (over 5 years ago)
- Last Synced: 2025-04-08T21:37:31.403Z (about 1 year ago)
- Language: TypeScript
- Size: 121 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 引入 Yep-React
现在从 yarn 或 npm 安装并引入 Yep-React。
```bash
$ yarn add @jdcfe/yep-react
```
修改 `src/components/Welcome/Welcome.tsx`,引入 Yep-React 的按钮组件。
```tsx
import * as React from "react";
import logo from "./logo.svg";
import "./Welcome.scss";
import {Button} from '@jdcfe/yep-react';
const Welcome: React.FunctionComponent<{ message: string }> = props => {
return (
{props.message}
);
};
export default Welcome;
```
## 安装 rocketact-plugin-yep-react
```bash
$ yarn add -D rocketact-plugin-yep-react
```
## run
### `npm start` or `yarn start`
Start development environment.
### `npm run build` or `yarn build`
Create a production bundle in the `build` folder.
构建出来的js已经是按需加载以后打包的代码
并且px已经转为rem