diff --git a/versioned_docs/version-7.x/testing.md b/versioned_docs/version-7.x/testing.md index 3c7b0a298f..4af9141ec9 100644 --- a/versioned_docs/version-7.x/testing.md +++ b/versioned_docs/version-7.x/testing.md @@ -85,18 +85,129 @@ We will go through some real-world case test code examples. Each code example co Navigate to another screen by button press. +Navigator: + ```js +import { useNavigation } from '@react-navigation/native'; +import { createStackNavigator } from '@react-navigation/stack'; +import { Button, Text, View } from 'react-native'; + +const HomeScreen = () => { + const navigation = useNavigation(); + + return ( + + Home screen +