NextDots Exercise - RN w/ Typescript
npm i
cd ios && pod install && cd ..
cd android && gradlew clean && cd ..
npm run ios Note: This npm Script was modified manually to remove the ios/build folder on every execution in order to avoid the in-famous red screens of death
npm run android
There are a couple of steps that can be easily taken in order to improve the List performance, which are:
Implement React Native's FlatList component, which, out of the box, handles the in-memory allocation dynamically by allocating memory and cleaning up once the component is no longer on screen.
Implement image cache, for this, there are several approaches possible, we can either select one of the many libraries out there or, we can implement a native/manual approach with the device's internal DB.
The IMG loading is the heaviest memory allocation task, hence, reason why it's best to use cache