This is an example ReactJS app that you can copy/paste in your project. It uses multiple state-management solutions, you can opt out of any of them. It also has all the configurations in place for you to start developing your app without the need of any wiring.
It follows the recommendations mentioned in Luci test react recommendations.
The gist of those recommendations are:
eslintrc.js
in the rules section).Before running and building the app, you need to fill in some data about it:
package.json
replace app_name
in name
with your apps name.{USER}
with the username of the app's author.cypress.json
replace {APP_BASE_URL}
with your app's base URL.Delete the items corresponding the the framework you won't use.
store
folder.react-redux
and @redux/toolkit
from package.json
.example_react_query
folder.react-query
from package.json
.To get TypeScript
's paths (such as @/
) working with ESLint you will need to add the following line to your vscode settings:
"eslint.workingDirectories": [ { "mode": "auto" } ],
This is because we use a monorepo and we need to localize the tsconfig
loaded for vscode's ESlint plugin.
After making the modifications mentioned above and you have a working project, you can use the following commands:
npm run watch
.npm run test
.npm run e2e
.npm run fix-eslint
.npm run typecheck
.npm run build
.