You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current example code at the end of the readme is not working, I guess because of the extra : null}.
Anyway, I think the whole code is deprecated with the latest react native version.
This code worked for me:
import * as React from 'react';
import { Button, View, } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import UnityView from '@asmadsen/react-native-unity-view';
const Stack = createStackNavigator();
function HomeScreen({ navigation }) {
return (
<View>
<UnityView style={{ position: 'absolute', left: 0, right: 0, top: 0, bottom: 0, }} />
</View>
);
}
function App() {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="Home" screenOptions={{headerShown: false}}>
<Stack.Screen name="HomeScreen" component={HomeScreen} />
</Stack.Navigator>
</NavigationContainer>
);
}
export default App;
The text was updated successfully, but these errors were encountered:
The current example code at the end of the readme is not working, I guess because of the extra
: null}
.Anyway, I think the whole code is deprecated with the latest react native version.
This code worked for me:
The text was updated successfully, but these errors were encountered: