A mock technical test as part of the frontend module of Command Shift.
I was expected to build a React web application that allows users to search for images based on a query relating to space. The application was built with React and JSX alongside Jest and React Testing library for testing purposes. Axios is used to perform http requests for retrieving data from the API and PropTypes is used for validating props.
For this application:
- Users are able to search for images by keyword using the NASA images API.
- Users are able to get the images that are returned by the API.
- Clone the repo:
git clone https://github.com/yan-fung/react-technical-test.git
- To install the package locally:
npm install
- Run the development server for the app.
npm start
- To test the codes in tests folder.
npm test
- Jest and React Testing library are used for testing purposes.
- Axios is used to perform HTTP requests for retrieving data from the API
- PropTypes is used for validating props.
Enter the name of the stars or planets in the search bar to get the images.
If I would have more time, I would like to add the following features to my application:
- Making the application more repsonsive to different sizes of device.
- Allowing users to see some basic info regarding the stars/planets alongside the images.
- Changing the UI design to make it more appealing and user-friendly.
🧑🚀 Yan Fung