This is my repo for the g2i React assessment. It is a 10 question trivia app. Find the assessment here
The code and functionality will be assessed on the following criteria:
- Functionality
- Code Format
- Project Structure
- Scalability
- Maintainability
- Use of industry best practices
- wireframes
- functional requirement
- API endpoint to fetch trivia data
See REQUIREMENTS.md for a basic understanding (was created for me to flesh out requirements)
- There is no error handling for the API request. The code and UI should handle network or server error properly.
- There are some hard assumptions in the code, such as that there will always be 10 question-answer pairs.
- Route guarding (logic around when the user should be redirected) could be improved
- Testing is limited to
- snapshots of presentational components
- end-to-end testing of the application
- Testing could improve if the following were tested:
- State management and reducers
- Improve end-to-end tests with mock data that can be asserted
- The app could benefit from further styling to make it more "productised"; some styles are in stylesheets and some are taking advantage of material-ui's withStyles utility which injects into . With more time I'd like to use styled-components across the board, to contain style and behaviour.
Note: Developed and tested using Node.js v8.11.1 and NPM v5.6.0 - please use the same versions.
cd
into root dirnpm install
To run development build:
npm run start
to run development build
Or run production build:
npm run build
to build for productioncd build
- Serve files with webserver from here. I like to use serve.
npm i -g serve
thenserve .
- Chrome v68 on Mac
- Chrome v68 on iPhone 6