Built on top of latest React Native sample(Vanilla version)
Note: Make sure you have completed the React Native - Environment Setup instructions till "Creating a new application" step, before proceeding.
Install
yarn
as the dependencies were installed with it. Xcode version was 14.3.1
Open
src/App.tsx
file and add you flickr api key
yarn install
cd ios && pod install
First, you will need to start Metro, the JavaScript bundler that ships with React Native.
To start Metro, run the following command from the root of your React Native project:
yarn start
Let Metro Bundler run in its own terminal. Open a new terminal from the root of your React Native project. Run the following command to start your Android or iOS app:
yarn android
yarn ios
If everything is set up correctly, you should see your new app running in your Android Emulator or iOS Simulator shortly provided you have set up your emulator/simulator correctly.
This is one way to run your app โ you can also run it directly from within Android Studio and Xcode respectively.
- SearchContainer render test unit fails because we run into an issue with
@gluestack-ui
lib - Due to latest versions, Gluestack Icons are not fully working with
gluestack-ui
lib, open issue here: software-mansion/react-native-svg#2101 - The search result list doesn't ensure merge of a list of unique items because when loading the next page, there's no check on whether the item has moved between pages and therefore an item might come in 2 pages, even after merge. This can affect the recycling of the list which would have caching issues. One work around would be replacing the array with a hashmap
- API_KEY and HOST should be in a environment file, so we don't store it on the repo by mistake.
- Fail case UX should be handled better, right now is silent in terms of user interface
- Right now history view is on the empty results component. It should have its own component
- SearchHeader unit test no completed
- History could be in a autosuggestion view as the user types in the input. Tap on a item should search again
- Persist history with redux persist?
- Strings could be using i18n
- There's no assurance the images sizes are appropriate
- Increase test coverage
- Pull to refresh
- If you come across
xcrun error: SDK "iphoneos" cannot be located
while installing pods, fix it running:sudo xcode-select --switch /Applications/Xcode.app
- in case you have issues with dependencies caching, try
yarn clear:all
If you can't get this to work, see the Troubleshooting page.
- Xcode 14.3.1
- node 19.7.0
- yarn 1.22.19
- pod 1.12.1
- javac 14.0.2
- react-native 0.72.3