Generating an application with React client side
Let's dive in straight away and create a React application with JHipster. You will need to open a Terminal to run the commands:
- Create a new folder and navigate to it by running
mkdir jhipster-react && cd jhipster-react
. - Now run the
jhipster
command in the Terminal. If you are running JHipster version 4.x instead of 5.x, then you will have to pass the experimental flag by runningjhipster --experimental
.
- JHipster will start with prompts; let's select default options for everything except for the question
Which *Framework* would you like to use for the client?
For this question, choose[BETA] React
and proceed. - Once all the prompts are completed, JHipster will generate the application and start installing dependencies before formatting the code using Prettier (https://prettier.io/) and starting the webpack build.
Note
You can run yarn prettier:format
to format the client-side code anytime. It will also be automatically run whenever you commit...