# react-component-npm **Repository Path**: hocgin/react-component-npm ## Basic Information - **Project Name**: react-component-npm - **Description**: 用来构建和发布 React 组件到 NPM 的模版项目 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-12-08 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## React Component Template ### 更改模版 - `package.json` > `@hocgin/component_name`=> `YOUR COMPONENT NAME` > `repository`=> `YOUR Repository URL` ### 发布 npm ```shell script # 1. 登陆 npm login # 2. 编译+发布 npm run deploy ``` ### 使用组件 ```shell script # 引入插件 yarn add @hocgin/gin-xx:latest # 在 jsx 中使用 import GinXx from '@hocgin/gin-xx' ```