My journey with react-native has just begun as I embark on the path of developing apps for both Android and iOS. Following this tutorial got me started, where I installed react version "react": "16.8.6" and successfully tried out some basic concepts. However, when it came to working on more complex projects, I noticed that almost every example called for the use of "expo".
Browsing through the documentation on Facebook's website, I came across references to expo-constants.
import Constants from 'expo-constants';
This raised a question in my mind - is react tightly coupled with expo? While I could give expo a shot, I read about potential limitations that made me hesitant. At this moment, I'm keen on creating a simple app in react-native without relying on expo. Where can I find the right resources and documentation for this?
Furthermore, my attempts at implementing a side menu using
- DrawerNavigator, and
- StackNavigator
following steps outlined in this tutorial hit a roadblock with an error message stating **undefined is not a function ** pointing towards the code snippet below:
const FirstActivity_StackNavigator = StackNavigator({
The code segment looks something like this
const FirstActivity_StackNavigator = StackNavigator({
First: {
screen: MainActivity,
navigationOptions: ({ navigation }) => ({
title: 'MainActivity',
headerLeft: <HamburgerIcon navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800'
},
headerTintColor: '#fff',
})
},
});
Later on, I discovered that StackNavigator is no longer part of "react-navigation", leaving me puzzled. Can someone guide me on starting fresh with react-native-cli sans expo or any other dependencies? Is expo a mandatory requirement even with react-native-cli? If there is a sample application showcasing all fundamental components of a typical app, it would greatly enhance my understanding. Grateful for any form of assistance rendered.