react-native-gesture-screens error code example

Example 1: error: Error: Unable to resolve module `react-native-gesture-handler` from `node_modules\@react-navigation\native\lib\module\Scrollables.js`: react-native-gesture-handler could not be found within the project.

yarn add react-native-gesture-handler

react-native link react-native-gesture-handler

Example 2: react native gesture handler

//first install using
expo install react-native-gesture-handler

//then import using API
import { TapGestureHandler, RotationGestureHandler } from 'react-native-gesture-handler';

class ComponentName extends Component {
  render() {
    return (
      <TapGestureHandler>
        <RotationGestureHandler>...</RotationGestureHandler>
      </TapGestureHandler>
    );
  }
}