Skip to content
Advertisement

Tag: reactjs

Error: Call to function ‘ExponentImagePicker.launchCameraAsync’ has been rejected

I’m trying to to make the user take a photo with “expo-image-picker” module using the “launchCameraAsync” function, and at first everything worked out fine, but now when trying to make the user take a photo, expo throws an warning and does not activate the camera, the warning is: Possible Unhandled Promise Rejection (id: 0): Error: Call to function ‘ExponentImagePicker.launchCameraAsync’ has

How to not re render the parent of a child component?

I’m having re-rendering issues, any help is greatly appreciated. I tried useMemo and useCallback and it broke the checkbox. I have a component, and inside that component, I display some info in my object. I have let’s say an object as such: The issue is that every time I click my checkbox it rerenders the whole component. This is a

Why .then() which is in useEffect is not updating my state

targetMovie is null when it comes to rednering. I couldn’t find any solutions. First time having unsolvable problem. Please help! Answer You need to represent 3 states: You’re currently waiting on getMovie to complete getMovie completed successfully getMovie completed and returned null/undefined You’re currently using the same condition (!targetMovie) to represent both 1. and 3. which is why you’re running

Advertisement