# wao-react-shared-components

> React Js shared components created and maintenance by Rokk3r team.

## Versions

* 1.0.0

[![NPM](https://img.shields.io/npm/v/wao-react-shared-components.svg)](https://www.npmjs.com/package/wao-react-shared-components) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
yarn add wao-react-shared-components
```

## Compilations issues

If you are getting some compilation errors during the yarn install process, the following might be helpful to solve it

* Windows
```bash
npm install --global windows-build-tools
```

* MacOS
```bash
brew install python
npm config set python $(which python3)
```


## Development

As a pre-requisite, you need to install yalc globally:
```bash
yarn global add yalc
```
In order to publish these package and publish to yalc automatically whenever a change is detected, you will need to run the following:
```bash
cd wao-shared-components
yarn
yarn watch
```

You should now be able to go to the project using this dependency and run the following commands:
```bash
cd ..
cd [your_project_folder]
yalc link "wao-react-shared-components"
```

##### *This section might no longer be needed but as left here as a precaution*
If you get an error related to Hooks and your React version, you might need to run the following commands from the `wao-shared-components` folder

```bash
cd wao-shared-components
sudo npm link ../wao-manager/node_modules/react
sudo npm link ../wao-manager/node_modules/react-dom
```

## Publishing

You will need an npm account, you can create one by accessing [npm's Sign Up](https://www.npmjs.com/signup). This account should be invited so it is able to create deployments.
You will also need to make sure that the package.json version has been updated accordingly, then you can run the following commands:

```bash
cd wao-shared-components
npm login
yarn build
npm publish
```

Once the process is finished you will need to wait a few minutes before it is fully deployed in npm.

## Usage

```jsx
import React, { Component } from 'react'

import MyComponent from 'wao-react-shared-components'
import 'wao-react-shared-components/dist/index.css'

class Example extends Component {
  render() {
    return <MyComponent />
  }
}
```

## Summary

* Shared Components

## TODO

* Envs Conf
* views for Creations, Editions
* Services to delete ations
* Documentation(Versioning, Implementation)
* Security checklist and NPM publications
* Translations(i18n language)
* Tests(E2E per exported components, performance)


<!-- ## License

MIT © [gatodeveloper](https://github.com/gatodeveloper) -->


### How do I get set up? ###

* Summary of set up
* Configuration
* Dependencies
* Database configuration
* How to run tests
* Deployment instructions

### Contribution guidelines ###

* Writing tests
* Code review
* Other guidelines