This file contains hidden or 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 requests = { | |
set: createPostRequest('POST', 'text'), | |
get: createRequest('GET', 'query') | |
}; | |
function createPostRequest(type, method, payload) { | |
twitch.rig.log($("#input").val()); //input | |
return { | |
type: type, | |
url: location.protocol + '//localhost:8081/sayit/' + method, |
This file contains hidden or 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
https://gist.github.com/https://gist.github.com/https://gist.github.com/https://gist.github.com/https://gist.github.com/ |
This file contains hidden or 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
"apollo-boost": "^0.3.0", | |
"graphql": "^14.1.1", | |
"graphql-tag": "^2.10.1" | |
"react-apollo": "^2.5.0", | |
/* src/config/api.js */ | |
----------------------------------- | |
import ApolloClient from 'apollo-boost'; |
This file contains hidden or 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 { ApolloClient } from 'apollo-client' | |
import { ApolloLink } from 'apollo-link' | |
import { withClientState } from 'apollo-link-state' | |
import { InMemoryCache } from 'apollo-cache-inmemory' | |
import { onError } from 'apollo-link-error' | |
/* NEW NEW NEW */ | |
import { createUploadLink } from 'apollo-upload-client'; | |
import { BatchHttpLink } from 'apollo-link-batch-http' | |
/* NEW NEW NEW */ |
This file contains hidden or 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
return str2; |
This file contains hidden or 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, { PureComponent } from 'react'; | |
import { AppRegistry, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; | |
import { RNCamera } from 'react-native-camera'; | |
import Permissions from 'react-native-permissions'; | |
class ExampleApp extends PureComponent { | |
constructor(){ | |
this.state = { | |
flash: 'off', |
This file contains hidden or 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, { PureComponent, useState } from 'react'; | |
import { AppRegistry, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; | |
import { RNCamera } from 'react-native-camera'; | |
import Permissions from 'react-native-permissions'; | |
const CameraApp = () => { | |
let [flash, setFlash] = useState('off') | |
let [zoom, setZoom] = useState(0) | |
let [autoFocus, setAutoFocus] = useState('on') |
This file contains hidden or 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, { PureComponent, useState, useEffect } from 'react'; | |
import { AppRegistry, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; | |
import { RNCamera } from 'react-native-camera'; | |
import Permissions from 'react-native-permissions'; | |
const CameraApp = () => { | |
let [flash, setFlash] = useState('off') | |
let [zoom, setZoom] = useState(0) | |
let [autoFocus, setAutoFocus] = useState('on') |
This file contains hidden or 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, { PureComponent, useState, useEffect } from 'react'; | |
import { AppRegistry, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; | |
import { RNCamera } from 'react-native-camera'; | |
import Permissions from 'react-native-permissions'; | |
const CameraApp = () => { | |
let [flash, setFlash] = useState('off') | |
let [zoom, setZoom] = useState(0) | |
let [autoFocus, setAutoFocus] = useState('on') |
This file contains hidden or 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
/* | |
Agenda! | |
- Outline of the lesson | |
- Review javascript objects | |
- Introduce Constructors with Animals and real World example | |
- Constructors exercise | |
*/ |