Skip to content

Instantly share code, notes, and snippets.

View simistern's full-sized avatar
🍊

Simon Stern simistern

🍊
View GitHub Profile
'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',
echo "Cleaning up node modules";
rm -rf node_modules;
npm install;
echo "Clearning all temp directories";
rm -rf $TMPDIR/react-native-packager-cache-*;
rm -rf $TMPDIR/metro-*;
rm -rf $TMPDIR/react-*;
rm -rf $TMPDIR/haste-*;
watchman watch-del-all;
echo "Cleaning up iOS folders"
componentDidUpdate(prevProps, prevState){
if(prevState.foo !== this.state.foo){
...do the thing
}
}
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>CSS Stylesheets with Relative Paths</title>
</head>
<body>
<header>
<html>
<p id="intro"></p>
<p id="content"></p>
<p id="conclusion"></p>
/*
Agenda!
- Outline of the lesson
- Review javascript objects
- Introduce Constructors with Animals and real World example
- Constructors exercise
*/
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 */
"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';
https://gist.github.com/https://gist.github.com/https://gist.github.com/https://gist.github.com/https://gist.github.com/