This has some basic tools and dependencies which can be used when creating a React app. Feel free to contact Tobias Tykvart with any questions when creating a new repository from this template
- Create a new repository with this one as a template.
- Clone the repository.
- Install Node JS. The Node Package Manager
npmis used to install all dependencies and runs the development server to display checkit locally in the browser. npm installwithin the repository folder. This installs all dependencies.- Use Emotion for styling, it is already installed and ready to go. Use the css prop to style elements.
- Run
npm start:devto start the json-server and dev web server and visitlocalhost:4000in your browser to see the app. - Recommended code editor and useful plugins:
- Visual Studio Code
- ESLint extension shows ESLint warning within VS Code.
- npm
- Prettier - Code formatter
- Better Comments for more human-friendly comments.
- Bracket Pair Colorizer
- ES7 React/Redux/GraphQL/React-Native snippets
- Guides
- indent-rainbow
- Reindent on Save
- npm Intellisense
Check package.md for explanations of all the packages we are using. These are installed automatically (see "Getting Started": step 4).
- Material UI provides template React components (@material-ui/icons).
npm start:devruns all commands necessary for development, or you can run them individually:npm startto start the development server locally. It should show 'Hello World' in the browser.npm run serverservesserver/db.jsonlocally to mock APIs
npm testto run all tests (should pass HelloWorld.test). Or usenpm run test:watchto run tests continually on any file change.npm run deployproduces an optimized production build in the branch "gh-pages" and publishes the website on GitHub Pages.npm run buildproduces an optimized production build in the folder "build" which can be published in other ways.
- Tobias Tykvart - Front End