An open API service indexing awesome lists of open source software.

https://github.com/silverbirder/managed-ea


https://github.com/silverbirder/managed-ea

ea react

Last synced: 21 days ago
JSON representation

Awesome Lists containing this project

README

          

# managed-ea

All have been introduced React environment.

## Output

![output](https://res.cloudinary.com/silverbirder/image/upload/v1551705895/managed-ea/managed-ea.png)

## Features

- [preact](https://preactjs.com/)
- [react](https://reactjs.org/)
- [react-router](https://reacttraining.com/react-router/)
- [react-helmet](https://github.com/nfl/react-helmet)
- [react-hot-loader](http://gaearon.github.io/react-hot-loader/)
- [redux](https://rackt.github.io/redux/)
- [styled-components](https://www.styled-components.com/)
- [loadable-components](https://github.com/smooth-code/loadable-components)
- [express](http://expressjs.com/)
- [workbox](https://developers.google.com/web/tools/workbox/)
- [eslint](https://eslint.org/)
- [stylelint](https://stylelint.io/)
- [prettier](https://prettier.io/)
- [flow](https://flow.org/)
- [jest](https://facebook.github.io/jest/)
- [enzyme](http://airbnb.io/enzyme/)
- [webpack](https://webpack.js.org/)
- [babel](https://babeljs.io/)
- [codecov](https://codecov.io/)
- [esdoc](https://esdoc.org/)
- [snyk](https://snyk.docs.apiary.io/)
- [circleci](https://circleci.com/)

## Install

```
$ git clone https://github.com/silverbirder/managed-ea.git
$ cd managed-ea
$ npm i
```

## Run

```
$ npm run dev
```

Go to `http://localhost:2525/`.

## Build

```
$ npm run build
$ npm run build:client (Only build client)
$ npm run build:server (Only build server)
```

## Build and analyze

```
$ npm run build:analyze
$ npm run build:client:analyze
$ npm run build:server:analyze
```

## Run for production

```
npm start
```

Go to `http://localhost:2525/`.

## Adding pages

Basically page component is implemented using React.PureComponent.

`src/pages/Home/index.js`

```jsx
/* @flow */

import * as React from 'react';
import Helmet from 'react-helmet';
import Button from 'components/Button';
import Title from 'components/Title';
import SubTitle from 'components/SubTitle';
import UserList from 'components/UserList';
import { fetchUsers as fetchUsersFromServer } from 'actions/user';
import type { PageProps, Dispatch } from 'types';

export default class HomePage extends React.PureComponent {
static loadData(dispatch: Dispatch) {
return dispatch(fetchUsersFromServer());
}

componentDidMount() {
const {
user: {
status: { isFetchedUserList },
},
userActions: { fetchUsers },
} = this.props;

if (!isFetchedUserList) {
fetchUsers();
}
}

render() {
const {
user: { userList },
userActions: { logout },
} = this.props;

return (



Home Page
User List

{
logout();
}}
isCenter
>
Logout


);
}
}
```