https://github.com/silverbirder/managed-ea
https://github.com/silverbirder/managed-ea
ea react
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/silverbirder/managed-ea
- Owner: silverbirder
- License: mit
- Created: 2019-01-06T10:23:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T14:47:30.000Z (over 2 years ago)
- Last Synced: 2025-01-21T09:30:16.587Z (over 1 year ago)
- Topics: ea, react
- Language: JavaScript
- Size: 172 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# managed-ea
All have been introduced React environment.
## Output

## 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
);
}
}
```