Skip to content

Commit ef8176e

Browse files
committed
using react native stack
1 parent ee1989b commit ef8176e

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function App() {
2828
<Stack.Navigator>
2929
<Stack.Screen
3030
name="Index"
31-
component={({navigation}) => { // Stack.Screen will inject a navigation prop to child components
31+
children={({navigation}) => {
3232
return(
3333
<View style={styles.container}>
3434
<Header/>

lectureNotes.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ React Native doesn't use HTML elements like regular ReactJS instead everything t
4949
React Native exposes a StyleSheet function used to create objects that can be fed into components to be used as styling. Similar to inline CSS you can use in React.
5050

5151
- Most properties found in CSS have a React Native equivalent
52-
- Styling relies heavily on a Flexbox-like design
52+
- Styling relies heavily on a Flexbox-like design https://facebook.github.io/react-native/docs/flexbox
5353
- There are two units available: percentages as a string and a arbitrary numbered unit which represents a set amount of pixels. The amount of pixels the unit represents is dependent on the dpi of the screen. https://facebook.github.io/react-native/docs/pixelratio.html#content
5454

5555
# Creating & Nesting Components
@@ -88,3 +88,8 @@ We need to install Stack
8888
Then we need to install peer dependencies depending on our platform. With express we need to:
8989
2) `expo install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view`
9090

91+
## Configuring RN Stack
92+
93+
1) import React Native Gesture Handler in your top level component `import 'react-native-gesture-handler'`
94+
2) Wrap your application in a `NavigationContainer` from `@react-navigation/native` package
95+
3)

0 commit comments

Comments
 (0)