# react-webpack-mobx

> Base structure in Webpack 4 for the creation of npm modules in React, Mobx

Latest version **1.3.0** (published 2018-03-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-webpack-mobx
pnpm add react-webpack-mobx
yarn add react-webpack-mobx
bun add react-webpack-mobx
```

## 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.3.0 |
| Published | 2018-03-05 |
| First published | 2018-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 487.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Leonardo Rico Guevara - https://github.com/kevoj |
| Maintainers | kevoj |
| Keywords | React, Component, webpack, webpack-mobx, react-mobx, webpack 4, react-webpack |

## Links

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

## Dependencies (10)

- [mobx](https://npm.io/package/mobx.md) ^3.6.1
- [react](https://npm.io/package/react.md) ^16.2.0
- [preact](https://npm.io/package/preact.md) ^8.2.7
- [apisauce](https://npm.io/package/apisauce.md) ^0.14.3
- [aphrodite](https://npm.io/package/aphrodite.md) ^1.2.5
- [react-dom](https://npm.io/package/react-dom.md) ^16.2.0
- [mobx-react](https://npm.io/package/mobx-react.md) ^4.4.2
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.1
- [preact-compat](https://npm.io/package/preact-compat.md) ^3.18.0
- [react-animations](https://npm.io/package/react-animations.md) ^1.0.0

## 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.3.0 (latest) — 2018-03-05
- 1.2.0 — 2018-03-05
- 1.1.0 — 2018-03-04
- 1.0.0 — 2018-03-04

## README

# react-webpack-mobx

[![NPM version](https://badge.fury.io/js/react-webpack-mobx.svg)](https://npmjs.org/package/react-webpack-mobx) [![GitHub license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://raw.githubusercontent.com/kevoj/role-calc/master/LICENSE)

> Base structure in Webpack 4 for the creation of npm modules in React, Mobx

### Installation

**1. Clone**

```bash
git clone https://github.com/kevoj/react-webpack-mobx.git your-react-component-name
cd [your-react-component-name]
npm install
```
**2. Set name of the library**

Replace in **package.json**

```json
{
    "name": "your-react-component-name",
    ...
}
```
**3. Create Link**

```bash
npm run build
npm link
```

## Development

### Start

Watch changes in mode development

```bash
npm start
```

### Build

Compile in mode production

```bash
npm run Build
```
### Structure

<pre> 
|-- dist (Compiled)
|   `-- index.js
|-- src (Your code here, view example in code source...)
|   |-- components
|   |   |-- Example.js
|   |   `-- styles
|   |       `-- Example.scss
|   |-- config
|   |   `-- constants.js
|   |-- providers
|   |   `-- User.js
|   |-- stores
|   |   `-- User.js
|   `-- index.js
`-- webpack.config.js
</pre> 

### Test the component in a project

```bash
cd Existing-React-Project
npm link your-react-component-name
```

### At this point you can already use your component, usage:

```javascript
import React, { Component } from 'react';
import { Example } from 'your-react-component-name'

class HelloWorld extends Component {
  render() {
    return (
        <Example />
    );
  }
}
export default HelloWorld;
```

## Production

### Publish in NPM

**1. Compile to production**

```bash
npm run build
```

**2. Login**

```bash
npm login
# login with your credentials in https://www.npmjs.com/
```

**3. Upload package**

**Note:** Verify your version of the component in **package.json**, you can not upload the same version twice

```bash
npm publish
# Available in https://www.npmjs.com/package/your-react-component-name
```
Now, you can install your package with:

```bash
npm install your-react-component-name--save
# :)
```

## License

MIT © [Leonardo Rico](https://github.com/kevoj/react-webpack-component/blob/master/LICENSE)

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