# build-plugin-sto-react-hmr

> build hot module replace for react project

Latest version **0.0.1** (published 2022-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install build-plugin-sto-react-hmr
pnpm add build-plugin-sto-react-hmr
yarn add build-plugin-sto-react-hmr
bun add build-plugin-sto-react-hmr
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2022-07-26 |
| First published | 2021-09-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Fujin Zhang |
| Maintainers | fuzan, zhangfujin |
| Keywords | build-scripts, react, hmr |

## Links

- npm: https://www.npmjs.com/package/build-plugin-sto-react-hmr
- npm.io page: https://npm.io/package/build-plugin-sto-react-hmr

## Dependencies (1)

- [lodash.merge](https://npm.io/package/lodash.merge.md) ^4.6.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2022-07-26
- 0.0.1-beta.1 — 2021-09-09
- 0.0.1-beta.0 — 2021-09-09

## README

Build Plugin Sto React Hmr
================================
build hot module replace for react project


### Getting Started

#### installation

Add via npm
```
$ npm install build-plugin-sto-react-hmr --save-dev
$ npm install react-hot-loader @hot-loader/react-dom
```

#### Usage

- Import `react-hot-loader` in your entry file (**before import React**)

```js
import 'react-hot-loader';
```

- Mark your **root component** as hot-exported

````js
// App.js
import { hot } from 'react-hot-loader/root';
const App = () => <div>Hello World!</div>;
export default hot(App);
````

- edit build.json file
```json
 "plugins": [
    ....
    "build-plugin-sto-react-hmr",
  ]
```

#### 效果
![Image text](https://imgcdn.sto.cn/76491B95-13A9-41-764x289-WX20210909-172709.png)

---
_Source: https://npm.io/package/build-plugin-sto-react-hmr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
