GithubHelp home page GithubHelp logo

tagraha / react-start Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 5.65 MB

Heavily modified of react universally with async data fetching (universal rendering)

License: MIT License

JavaScript 99.19% CSS 0.81%
react reactjs redux redux-thunk expressjs babel universal webpack4 flowjs jest

react-start's Introduction

All Contributors Build Status CircleCI style: styled-components Known Vulnerabilities

Dependency Status Dev Dependency Status

Heavily modification of react-universaly

React boilerplate with code spliting, asynchronous data fetching (universal/isomorphic rendering)

Heads up

We are using react ^16.3.0. You might want to read this (React v16.3.0: New lifecycles and context API) before starting playing around with this boilerplate.

Installation

git clone [email protected]:tagraha/react-start.git
cd react-start
npm install

at this point make .env file on your root directory. you can copy it from .env_example file.

npm run develop

open up your browser and navigate to localhost:1337

Production script command

npm run build
npm start

The App

Navigate to shared/container/DemoApp and start exploring the code

Configuration

you can configure like disabling SSR mode, renaming service worker file etc with value.js file. here's the the quick look of the file

const values = {
  clientConfigFilter: {
    // This is here as an example showing that you can expose variables
    // that were potentially provivded by the environment
    welcomeMessage: true,
    // We only need to expose the enabled flag of the service worker.
    serviceWorker: {
      enabled: true,
    },
    // We need to expose all the polyfill.io settings.
    polyfillIO: true,
    // We need to expose all the htmlPage settings.
    htmlPage: true,
  },

  // The host on which the server should run.
  host: EnvVars.string('HOST', 'localhost'),

  // The port on which the server should run.
  port: EnvVars.number('PORT', 1337),

  // The port on which the client bundle development server should run.
  clientDevServerPort: EnvVars.number('CLIENT_DEV_PORT', 7331),
  welcomeMessage: EnvVars.string('WELCOME_MSG', 'Hello world!'),

  // Disable server side rendering?
  disableSSR: false,
  browserCacheMaxAge: '365d',
}

TODOS

  • attach redux
  • make it async data fetch
  • upgrade to webpack 4 (perks)
  • unit testing
  • flowjs type checker
  • redux-saga over redux-thunk?

Flow Coverage

we're currently working on flow coverage. you can switch to branch feature/flow to take a look at the code flow-coverage

Contributors

Thanks goes to these wonderful people (emoji key):


Tirta Nugraha

๐Ÿ’ป ๐Ÿ“– ๐Ÿ”Œ ๐Ÿ‘€ โš ๏ธ

This project follows the all-contributors specification. Contributions of any kind welcome!

react-start's People

Contributors

snyk-bot avatar tagraha avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.