Simple expo app that shares code between web and iOS platforms. Frontend interfaces with popular search API from Unsplash. Users can view the most recent trending photos or trigger a custom search for other interesting photos.
Features include:
- Basic search
- Simple pagination (Prev page or Next page)
- Photo sorting by 'Newest' or 'Popularity'
- Basic react-navigation setup
- Simple "my favorites" list management
- Basic unit tests using Cypress.io
Tech stack:
- Expo (React Native + React)
- React-Query (for data-fetching and caching)
- Typescript
- Nativebase (UI library)
- Zustand (react state management)
- Cypress.io (e2e ui testing)
Notes:
- Best experience for web: Chrome fullscreen, light mode.
- Best experience for mobile: iphone 14 pro max, light mode
- Didn't get a chance to test across multiple devices for responsiveness BUT photo-grid is generally responsive on web.
- Pagination loads 10 photos at a time, determined by the "page" query variable of the Unsplash API.
- Sorting preference persists across search and favorites.
First, install the required dependencies:
yarn install
Next, run the development server:
npx expo start
Cypress.io is leveraged as the testing framework of choice. To run cypress locally:
yarn e2e
- incorporate devtools for Zustand and React-Query which allows us to see state changes and other state mutations in logging.
- improve image performance for different image formats
- give users the ability to select trending collections for "quick search"
- provide autocomplete functionality in search input
- add a loader state between page renders and for new image renders
- move web app into Next.js for better navigation experience