RNHome is a React Native implementation and mixed-code integration of the ClothesStore-iOS project
Subclassed DataSourcePresenter to HomePresenter to interact with the bridge as DataSourcePresenter initially served as a base presenter which did all the fetching based on the inferred model type.
Bundle resources with the command below
react-native bundle --entry-file='./index.js' --bundle-output='./main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'
If you want to hot reload with active changes, in HomeController.swift, change the jsCodeLocation to your local environment
let jsCodeLocation = URL(string: "http://localhost:8081/index.bundle?platform=ios")!
1.main.jsbundle was deliberately added to avoid re-bundling and for those who want to directly run from Xcode without having to do any major setup.
2.The backend was designed in a way that certain REST requests had to be chained, hence the full refresh in some controllers.