I’m currently working on a Bumble-like swipe system so I can swipe horizontally (thanks to an Animated.View and a PanResponder so I can move my view wherever I want), and vertically (because my view is longer than the height of my screen). After a long day of search, I finally found a solution which permits to know if the user
Tag: react-native
Can’t set state in js react-native
Getting error while trying to setState in React Native. Code Error TypeError: undefined is not an object (evaluating ‘_this.setState’) Answer useState Hook Functional components don’t have access to setState method but useState hook. useState hook works by defining the name of value, e.g. foo followed by it’s setter. It’s a convention to name the setter with the same name as
Firestore data not displaying in my flatlist?
I am trying to display the posts of whoever a user is following: First, I query firestore and get the list of all the users the current user is following For each user in “following”, I get their posts I order their posts by data created, using a javascript sort function Here is the code: The issue lies in setting
change parent state from child
I want to change the parent state from the child but I can access the callback function just once Answer Try this:
How to change the child state component from parent in functional component
I have created a Count down timer component and I have a Button near this component and I want when users click on this button, resets the timer and for doing this I should change the child state I found the solution for changing parent state from the child but I don’t find the solution to this can it be
Native Module cannot be null (ios) – Expo
I am developing a Expo-managed (not bare) mobile application. I recently ran into this issue: it crashes on start on ios. and I understand that this has to do with some of my packages requiring ios native modules, therefor I have to eject before I can use this package. However, my goal here is not to eject but to find
Paginating data causing unusual behavior?
I am displaying “global posts” on one of my tabs. Currently, there are only 11 posts in the database: In the app Some of the posts are being duplicated, and I have no idea why these SPECIFIC posts are being duplicated, as it seems to me like it is happening at random. Here is the code for how I paginate
Recommendations for developing webview content on Android?
I’ve got a webview component that loads some html and javascript. The html + javascript is fairly large, and is compiled using webpack into a single page (html, javascript and css is all in one document). I’m having trouble figuring out a reasonably efficient approach to developing my web content, and could use some advice. My webview is loaded like
Cannot upload app to appstoreconnect cause “UIWebView” is still being used – ITMS-90809
So i am using React Native to develop the app and trying to upload the app to TestFlight via AppStoreConnect. Everytime i upload i get an email from apple: ITMS-90809: Deprecated API Usage – New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability Yes, i’ve taken a loook at similar posts that
Getting location from another file using Promise in react native with react-native-geolocation-service
I’m trying to make a helper function to get the current location of the user, but the result of my promise is undefined. This function is working and I can retrieve my coordinates : But when I call my function here, I get undefined : What am I doing wrong? Answer As written, getUserLocation() does not return its request(…).then() promise.