K
K
kidar22018-01-10 16:17:36
Java
kidar2, 2018-01-10 16:17:36

There is an example of a simple application: React.JS + Java WebApp?

Already tired of doing at least something simple.
The client (js in the browser) requests data from the server (Java + Tomcat), it returns json => the client builds a ui list on React.
It is important that there is no server rendering with Node.js, and that it does not start at all.
The problem is to set up Maven to compile js, jsx and so on.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
abberati, 2018-01-10
@abberati

compiling js, jsx and other things is not the responsibility of Maven,
do front assembly with webpack, as everyone else does.
assembly of the back - Maven'om.
the static server returns the assembled front, the front communicates with the back via api

K
kidar2, 2018-01-11
@kidar2

I managed to make a simple hello world based on this example (which, like all the other examples I found, did not work right away).
Now I'm trying to figure out:
1. how to debug the code in the browser (there are no Hellow.jsx and app.jsx in devtools)
2. how to make hot realod when the source code changes
3. how to build for production

P
Pantene742, 2018-03-31
@Pantene742

The new React comes with webpack configured right away. Detaching it from webpack is not realistic. and collect something else as well. the latest versions of web UI frameworks are already at the WPF .net level, there are several assembly steps. including compiling with TypeScript

S
Serega063, 2019-07-27
@Serega063

If it's still relevant, try JHipster, there's already react java spring and a lot more crossed together

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question