React Navigation V6 Expo SDK 45 Error

Today I was updating a few of my expo clones to the latest Expo SDK 45 and kept getting the following error:

[react-native-gesture-handler] Seems like you're using an old API with gesture components, check out new Gestures system!

Searching this error gave me mixed results but finally found a solution that worked for me.

I am using the latest React Navigation v6 and more specifically the package:

  "@react-navigation/native": "^6.0.10"

The solve was pretty simple, just changing all usages of @react-navigation/stack

import { createStackNavigator } from '@react-navigation/stack';

const Stack = createStackNavigator();

To use the @react-navigation/native-stack like below

import { createNativeStackNavigator } from '@react-navigation/native-stack';

const Stack = createNativeStackNavigator();

This is not a drop-in replacement, but most things should be. Double check the API for native-stack to be sure.

Hope this helps!