Git Product home page Git Product logo

javareact's Introduction

JavaReact

Sample project incorporating React in a Java web appliation

Purpose

  • Incorporate React into a Java web application while still using standard Maven build commands for everything.
  • When using "mvn jetty:run" include Hot Module Reloading so changes take effect immediately without restarting server or refreshing browser page.
  • When using "mvn package" minimize all .js and .css files and include them in the .war file
  • Require no changes to server side files (like web.xml) to support development mode

Requirements

  • Java 7
  • Maven 3.2

Get Started

git clone https://github.com/emmostrom/JavaReact.git
cd JavaReact
mvn jetty:run

Open browser to http://localhost:8080/JavaReact

edit src/main/jsx/Hello.jsx and change Hello {this.props.who} to Good Bye {this.props.who} and save file. The browser should automatically show the new change.

Changes to .less files will automatically get picked up as well.

Server Side Rendering

See the SSR branch which requires Java 8 : https://github.com/emmostrom/JavaReact/tree/SSR

javareact's People

Contributors

emmostrom avatar

Watchers

James Cloos avatar Erik001 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.