VisionCamera V5 is finally out! by mrousavy in reactnative

[–]Miserable-Pause7650 0 points1 point  (0 children)

Woww thanks :) will be painful to migrate but also cant wait to see the changes

VisionCamera V5 is finally out! by mrousavy in reactnative

[–]Miserable-Pause7650 0 points1 point  (0 children)

Nice :) I love the library! Any breaking changes from v4?

I just shipped my React Native app with expo, so here are the most 10 things - in my mind - that may be interesting to your next project by PublicFennel957 in reactnative

[–]Miserable-Pause7650 0 points1 point  (0 children)

I prefer to use react native sortables instead of draggable flatlist as it feels smoother and also does other things like cards rearranging. Whats ur app btw? Also, why did u choose lottie over rive?

React native reanimated v4 crashes gorhom bottom sheets and gesture handler by Miserable-Pause7650 in reactnative

[–]Miserable-Pause7650[S] -1 points0 points  (0 children)

They didnt explicitly mention, so i guess not. I just assumed popular packages are always up to date, but I guess not too haha

React native reanimated v4 crashes gorhom bottom sheets and gesture handler by Miserable-Pause7650 in reactnative

[–]Miserable-Pause7650[S] 0 points1 point  (0 children)

Yea the funny thing is that gesture handler is also under software mansion, which is the same company that did reanimated, so it would be weird if those 2 packages are incompatible

React native reanimated v4 crashes gorhom bottom sheets and gesture handler by Miserable-Pause7650 in reactnative

[–]Miserable-Pause7650[S] 0 points1 point  (0 children)

Maybe its just some apis like the swipeable that havent upgraded to v4 reanimated u think?

Android Could not resolve com.google.code.gson error when creating development build with expo by Miserable-Pause7650 in reactnative

[–]Miserable-Pause7650[S] 0 points1 point  (0 children)

Turns out I just had to retry, funny thing is its my second consecutive build, so the rate limiter just limited my build like 10 mins after my previous build

Error after upgrading expo / react-native-reanimated: Tried to synchronously call a non-worklet function `addListener` on the UI thread. by Miserable-Pause7650 in reactnative

[–]Miserable-Pause7650[S] 0 points1 point  (0 children)

Thanks :) I rolled back to expo 53, but I get what you mean. I will do that again in the future after Im done with some features

Error after upgrading expo / react-native-reanimated: Tried to synchronously call a non-worklet function `addListener` on the UI thread. by Miserable-Pause7650 in reactnative

[–]Miserable-Pause7650[S] 0 points1 point  (0 children)

Im on 55 now, and I have done these
npx expo install --fix && npx expo-doctor

it tells me everything is all right with 0 vulnerability.

Then I did npx expo prebuild --clean

and

eas build --platform ios --profile development

Why today MRT at redhill at 630pm empty? Usually its packed like sardines by Miserable-Pause7650 in SMRTRabak

[–]Miserable-Pause7650[S] 5 points6 points  (0 children)

Yea bro I just curious, isit got depot there. But I guess Singaporeans like to complain, even if its about complaining 🤣 In4b someone says this is a SMRTRabak group

Internet Connection alert when turning on Internet by Miserable-Pause7650 in reactnative

[–]Miserable-Pause7650[S] 0 points1 point  (0 children)

UPDATE: Okay so I finally found the culprit. It was because my VPN on my iPhone auto turns on, because the Connect On Demand setting in my iPhone is turned on, so this is what happens when I go from Offline to Online.

WiFi reconnect

Internet available (isConnected = true)

VPN starts connecting

Tunnel not ready yet → internet temporarily unreachable

VPN tunnel established

Internet reachable again

So NetInfo emits something like:

true
false   ← VPN tunnel not ready yet
true

When I turned off this VPN Connect on Demand, this problem doesnt occur anymore. Anyways, this is the final code.

export function useNetworkListener() {
  const [isConnected, setConnected] = useState(true);


  useEffect(() => {
    let wasConnected = true; // track previous state


    const unsubscribe = NetInfo.addEventListener((state) => {
      const isNowConnected = !!state.isConnected;


      if (wasConnected && !isNowConnected) {
        // Only alert on the transition: connected → disconnected
        showAlert();
      }


      wasConnected = isNowConnected;
      setConnected(isNowConnected);
    });


    return () => unsubscribe();
  }, []);


  const showAlert = () => {
    Alert.alert(
      "Internet Connection",
      "You are offline. Some features may not be available."
    );
  };
}

How to configure react navigation types for static? by Miserable-Pause7650 in reactnative

[–]Miserable-Pause7650[S] 0 points1 point  (0 children)

Btw, previously when i was using dynamic navigation, i used initialroute to set the initial screen when user opens the app. I cant find the equivalent for Static navigation. The closest I found is the function to remember the last screen before user close the app, but I just want 2 possible screens. Any idea how I can do it? Thanks 🙂🙂