Code Monkey home page Code Monkey logo

universal-react-helloworld's Introduction

Simple Universal React.js "Hello world" Application

Simplest possible starting point for using universal/isomorphic/shared React.js + Node.js + Express.js

Installation

Use Git to clone this app, then:

npm install

Commands

Start the server with all the code transpiled and bundled in a single command:

npm run start

Transpile all the ES6/ES2015 JavaScript to ES5 for Node and browsers

npm run build

Bundle all the client-side JavaScript into a single file (public/js/bundle.js)

npm run bundle

Why?

After spending some time searching for universal/isomorphic starter projects to learn from, nearly every one of them:

  • Had a list of NPM dependencies longer than my screen viewport.
  • Included more dotfiles than source files.
  • Made other technology decisions for me, like SASS/Less, Mocha/Jasmine, Webpack/Gulp/Grunt, which implementation of Flux to use, etc.
  • Had too much code and/or too many concepts to learn at once.

This project:

  • Is NOT opinionated
  • Does NOT make any tech choices for you beyond Express.js + React.js
  • Does NOT include any CSS pre-processor or framework
  • Does NOT include any testing framework
  • Does NOT include any specific build tool config (Gulpfile, Gruntfile, etc.)
  • Uses ES6/ES2015 for all JavaScript you write
  • Uses React.js on both the client AND server (Universal JavaScript) so you can pre-render your initial React.js components for faster initial page load speed and better SEO.

So in essense, this project is a good example starter project for learning how to render React.js components on both the client and server side, and then lets you take it from there.

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.