# monoapp-react

> monoapp + react

Latest version **1.1.2** (published 2018-11-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install monoapp-react
pnpm add monoapp-react
yarn add monoapp-react
bun add monoapp-react
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2018-11-19 |
| First published | 2018-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Jon Gacnik |
| Maintainers | amongiants |
| Keywords | monoapp, react |

## Links

- npm: https://www.npmjs.com/package/monoapp-react
- Repository: https://github.com/jongacnik/monoapp-react
- Homepage: https://github.com/jongacnik/monoapp-react#readme
- Issues: https://github.com/jongacnik/monoapp-react/issues
- npm.io page: https://npm.io/package/monoapp-react

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^16.6.1
- [react-dom](https://npm.io/package/react-dom.md) ^16.6.1

## 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

- 1.1.2 (latest) — 2018-11-19
- 1.1.1 — 2018-11-15
- 1.1.0 — 2018-11-12
- 1.0.0 — 2018-11-12

## README

# monoapp-react

[monoapp](https://github.com/jongacnik/monoapp) plugin to use [React](https://github.com/facebook/react) as a view layer

## Example

```js
var monoapp = require('monoapp')
var withReact = require('monoapp-react')

var app = monoapp()

app.use(withReact)
app.route('/', view)
app.mount('#app')

function MyComponent () {
  return <div>Hello World</div>
}

function view (state, emit) {
  return (
    <main>
      <MyComponent />
    </main>
  ) 
}
```

## Component

An instance of `React.Component` extended with `monoapp` state and emit is included:

```js
var { Component } = require('monoapp-react')

class MyComponent extends Component {
  render () {
    console.log(this.global)
    console.log(this.emit)
    
    return <div>Hello World</div>
  }
}
```

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