-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Part 1 tutorial does not mention how to bootstrap/inject React into the project #124
Comments
i got it working plugin setup like this:
|
I had a series of problems, mainly with the webpack, and also with the client rest.js. I believe that a more detailed explanation of rest clients, other options, and especially rest.js client would help. Anyway, in the end, after a lot of struggle, I fixed as in the previous answer, however, not directly, nor even in the first attempt, I can't explain why. What I did initially: I deleted the target folder, used the following code in pom.xml, and finally ran the command line In pom.xml
In app.js I use this code, replacing
In package.json I use the latest version for each dependency:
|
@asiupt react is installed by npm install executed from: The package.json or webpack.config.js you need to create the files by yourself or you can run npm init Creating a package.json file, for webpack.config.js there is also an option to generate it using webpack-cli |
It looks like, to maintain sanity, the configuration for the frontend-maven-plugin was defined in the root tutorial pom and the configuration is inherited by all the submodules, like `basic`. The problem was that one following along with the project needs that configuration. Now, we show the full configuration instead by including the frontend-maven-plugin configuration from the root POM instead of from `basic`'s POM. Should resolve some concerns described in issues spring-attic#124, spring-attic#128.
This pull request: #128 should resolve issues with |
I have the same problem. When visiting localhost:8080, I get a page with the word "index". The React components aren't rendered. |
Nope. Found the issue. @marcelovidigal had the right idea swapping out done() for then() |
I am following the Do-It-Yourself version of the tutorial and the Part 1 tutorial does not mention how to bootstrap/inject React into the project.
I have included "frontend-maven-plugin" in my pom.xml and updated my project. Upon running, localhost:8080/api displays the correct JSON data, as expected. HOWEVER, localhost:8080 displays a blank page. Therefore, React components are not working.
I cannot see package.json or webpack.config.js in my class path.
Please tell me how to include React components so the tables can be displayed.
The text was updated successfully, but these errors were encountered: