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
class Form extends React.Component { | |
constructor (props) { | |
super(props) | |
this.state = { | |
input: '' | |
} | |
} | |
handleChangeInput = (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
class Form extends React.Component { | |
constructor (props) { | |
super(props) | |
this.state = { | |
input: '' | |
} | |
} | |
handleChangeInput = (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 PropTypes from 'prop-types' | |
export default class MyComponent extends React.Component { | |
render() { | |
// Render Something | |
} | |
} | |
// You can declare that a prop is a specific JS type. |
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 PropTypes from 'prop-types' | |
export default class MyComponent extends React.Component { | |
render() { | |
// Render Something | |
} | |
} | |
// You can declare that a prop is a specific JS type. |
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, {Component} from 'react' | |
import PropTypes from 'prop-types' | |
import { View, StyleSheet } from 'react-native' | |
import Video from 'react-native-video' | |
export default class VideoComponent extends React.Component { | |
renderVideo () { | |
return( | |
<Video |
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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* | |
* @format | |
* @flow | |
*/ | |
import React, {Component} from 'react'; | |
import {Platform, StyleSheet, Text, View} from 'react-native'; |
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, { Component } from 'react'; | |
import { | |
AlertIOS, | |
StyleSheet, | |
Text, | |
TouchableHighlight, | |
View, | |
NativeModules | |
} from 'react-native'; |
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
clickHandler() { | |
TouchID.isSupported() | |
.then(biometryType => { | |
// Success code | |
if (biometryType === 'FaceID') { | |
console.log('FaceID is supported.'); | |
} else if (biometryType === 'TouchID'){ | |
console.log('TouchID is supported.'); | |
} else if (biometryType === true) { | |
// Touch ID is supported on Android |
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
'use strict'; | |
import React, { Component } from 'react'; | |
import { | |
AlertIOS, | |
StyleSheet, | |
Text, | |
TouchableHighlight, | |
View, | |
} from 'react-native'; |
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 Keychain from 'react-native-keychain'; | |
async () => { | |
const username = 'zuck'; | |
const password = 'poniesRgr8'; | |
// Store the credentials | |
await Keychain.setGenericPassword(username, password); | |
try { |
OlderNewer