Skip to content

Tag: react-native

How to return from promise inside useEffect

I am creating my first custom hook. I would like the hook to return the deviceType which is the result of a Promise in the hook. Hook: Use of hook: Console: undefined I may be having difficulty understanding the useEffect hook but I believe it should just fully run once here. Is the item being returned still …

Calling 2 props onSLidingComplete in slider

This is my card component. this card i want to call to main component and this is my main component in here i want to call props.getData(value) and props.selectedId but just one of these can be use onSlidingComplete. If someone can help me, its so helpfull to me for finish my project Answer This is what you&#…

React Native UseEffect API CALLS

How to handle multiple api calls in the same render ? Example : I want to get some info from first API call like this for example : and i want to instantly use it for the next API CALL coming under this call example : Soo the question is how to use information that i get inside first API