This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'react-native-gesture-handler'; | |
import * as React from 'react'; | |
import {Text, Button} from 'react-native'; | |
import {NavigationContainer} from '@react-navigation/native'; | |
import {createDrawerNavigator} from '@react-navigation/drawer'; | |
// Our Screens | |
function Screen1({navigation}) { | |
return ( | |
<> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import {Text} from 'react-native'; | |
import {NavigationContainer} from '@react-navigation/native'; | |
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; | |
// Our Tabs | |
function Tab1() { | |
return <Text>Tab 1</Text>; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import {Text} from 'react-native'; | |
import {NavigationContainer} from '@react-navigation/native'; | |
import {createNativeStackNavigator} from '@react-navigation/native-stack'; | |
// Our Screens | |
function Screen1() { | |
return <Text>Screen 1</Text>; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button onclick="console.log(this.tagName.toLowerCase())"> | |
Click to see the name of tag | |
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var doSomething = (() => this.a); | |
var a = "From Global"; | |
var Context = {a: 'Hello World!'}; | |
// Use bind to set the `this` context | |
var x = doSomething.bind(Context); | |
console.log(x()); // From Global | |
// Use call to set the `this` context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doSomething() { | |
return this.a; | |
} | |
var x = doSomething.bind({a: 'Hello World!'}); | |
console.log(x()); // Hello World! |
NewerOlder