Skip to content

How do you do basic navigation between Pages for tv platforms? #1784

Closed Answered by Marius456
CircusCanard asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @CircusCanard,
You need to add these plugins in renative.json:

    "plugins": {
        "react-native-safe-area-context": "source:rnv",
        "@react-navigation/native": "source:rnv",
        "@react-navigation/native-stack": "5.0.5",
        "react-native-screens": "source:rnv"
    }

As an example I added two pages in src\app\index.tsx:

import React from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';

const Stack = createNativeStackNavigator();

const App = () => (
    <NavigationContainer>
        <Stack.Navigator>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@CircusCanard
Comment options

Answer selected by pauliusguzas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants