I'm encountering a warning in Xcode's log when testing my React Native app:
Synchronous URL loading of http://localhost:8081/assets/assets/image/ImageUser.png?platform=ios&hash=c7acd2e8e0e1768b55d4ee625fb73ffb should not occur on this application's main thread as it may lead to UI unresponsiveness. Please switch to an asynchronous networking API such as URLSession.
My code:
import {Image} from 'react-native'const Images = { user: require('../image/ImageUser.png'),}const AppImage = () => {<Image source={Images.user} />}My app displays the image normally despite the warning.
How can I resolve this warning and implement asynchronous image loading using URLSession (or another recommended approach)?