Coder Social home page Coder Social logo

ronal2do / vortex-react Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yuthelloworld/vortex-react

0.0 2.0 0.0 3.37 MB

🚀 A React starter kit. Redux or Mobx, react-router-dom, webpack3, all is in.

License: MIT License

JavaScript 96.51% HTML 0.73% CSS 2.76%

vortex-react's Introduction

vortex-react

Build Status JavaScript Style Guide license

Get start with React/Redux/React-Router-Dom/Webpack3/Reactstrap

2017/8/29 checkout branch mobx to see the version mobx instead of redux!

中文

Table of Contents

Feature

  • React
  • ES6/7/8 + Babel
  • Webpack3
  • Redux
  • React-Router-Dom
  • Reactstrap + Bootstrap^4.0.0-alpha.6 (UI)
  • Sass
  • Eslint
  • Express

Get Start

Before the start, we recommend you read these documentation.

You can tru ES6 and JSX in Babel REPL.

We recommend node 6.x + npm 5.x + yarn ^0.27.5。

Install

git clone https://github.com/yuthelloworld/vortex-react.git <my-project-name>
cd <my-project-name>
yarn  # Install project dependencies (or `cnpm install`)

Run

yarn start  # Start the development server (or `npm start`)

Scripts

yarn <script> Description
start Serves your app at http://localhost:3000
build Builds the application to ./dist
lint Lints the project for potential errors
lint:fix Lints the project and fixes all correctable errors

Project Structure

File Tree

.
├── build                    # All build-related code
├── public                   # Static public assets (not imported anywhere in source code)
├── server                   # Express application that provides webpack middleware
│   └── main.js              # Server application entry point
├── src                      # Application source code
│   ├── index.html           # Main HTML page container for app
│   ├── main.js              # Application rendering
│   ├── normalize.js         # Browser normalization and polyfills
│   ├── components           # Global Reusable Components
│   ├── layouts              # Components that dictate major page structure
│   │   └── PageLayout       # Components that dictate major page structure
│   ├── routes               # Components that dictate major page structure
│   │   ├── index.js         # Main application routes with store
│   │   ├── Home             # Fractal route
│   │   │   ├── index.js     # Route definitions and async split points
│   │   │   ├── assets       # Assets required to render components
│   │   │   ├── components   # Presentational React Components
│   │   │   └── routes **
│   │   └── Counter
│   │       ├── index.js
│   │       ├── container    # Container component
│   │       ├── modules      # redux module(reducers/constants/actions)
│   │       └── routes **
│   ├── store                # Redux store
│   │   ├── createStore.js   # Create store
│   │   └── reducers.js      # Reducers
│   └── styles               # Style sheet
└── tests                    # Unit tests

Data Flow

redux

Logic

vortex-react


Live Development

We use webpack-dev-middlewareabdwebpack-hot-middleware for server and HMR 。

We recommend using Redux DevTools Chrome Extension.


Deploy

Use nginx to proxy static web to start this app。Point at ~/dist/index.html.See more

This is an exmaple in ubuntu:

  • Install nginx:
sudo apt-get install nginx
  • Config:
sudo vi /etc/nginx/sites-available/default
  • Copy the flowing to config:
server{
  listen 8001;
  server_name 127.0.0.1;  //server Ip
  location / {
    proxy_pass http://127.0.0.1:3000;
  }
}
sudo service nginx restart

// `cd your app`
yarn start

Code Style

Refrence airbnb/javascriptJavascript Standard Style and standard-react,we set up .eslintrc

More

Welcome PRs and issues!

vortex-react's People

Contributors

yuthelloworld avatar liadbiz avatar ronal2do avatar keifergu avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.