# srh-plugins-logger

> 为 Structured-React-Hook 设计的快速调试插件

Latest version **0.1.6** (published 2021-06-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install srh-plugins-logger
pnpm add srh-plugins-logger
yarn add srh-plugins-logger
bun add srh-plugins-logger
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2021-06-22 |
| First published | 2021-03-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 11.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | shihong |
| Maintainers | kinop88 |
| Keywords | react, flux, hook, state, useReducer |

## Links

- npm: https://www.npmjs.com/package/srh-plugins-logger
- Repository: https://github.com/kinop112365362/srh-plugins-logger
- npm.io page: https://npm.io/package/srh-plugins-logger

## Dependencies (4)

- [object.pick](https://npm.io/package/object.pick.md) ^1.3.0
- [lodash.merge](https://npm.io/package/lodash.merge.md) ^4.6.2
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.12.1
- [lodash.mergewith](https://npm.io/package/lodash.mergewith.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.1.6 (latest) — 2021-06-22
- 0.1.5 — 2021-04-01
- 0.1.4 — 2021-03-26
- 0.1.3 — 2021-03-24
- 0.1.2 — 2021-03-24
- 0.1.1 — 2021-03-24
- 0.1.0 — 2021-03-24

## README

# Srh-Plugins-Logger

## Quick Start

```js
import { srhLogger } from 'srh-plugins-logger'
import { createStore } from 'structured-react-hook'

const useStore = createStore(
  {
    initState: {name:''},
    service:{
      helloWorld(){
        this.rc.setName('hello world')
      }
    }
    controller: {
      onMount(){
        this.service.helloWorld()
      }
    }
  },
  [srhLogger]
)
function App(){
  const store = useStore()
  useEffect(()=>{
    store.controller.onMount()
  },[])
  return(
    <div>{store.state.name}</div>
  )
}
```

运行会输出如下 Logger

[Ctrl] onMount

[Service]  helloWorld 'helloWorld'

[Reducer Case]   setName '' → 'helloWorld'

---
_Source: https://npm.io/package/srh-plugins-logger · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
