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 firebase from 'firebase/app' | |
import 'firebase/firestore' | |
import 'firebase/auth' | |
import 'firebase/functions' | |
import 'firebase/storage' | |
const firebaseConfig = { | |
apiKey: "AIzaSyBKSk6fpE4XsscB-Id2QGDthUGVZlAVHtc", | |
authDomain: "react-firebase-next.firebaseapp.com", | |
databaseURL: "https://react-firebase-next.firebaseio.com", |
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 from 'react' | |
import { firebase } from './firebase' | |
export const initialState = { | |
currentUser: {}, | |
data: {} | |
} | |
export const Context = React.createContext(initialState) |
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
const tree = { | |
id: "1", | |
children: [ | |
{id: "2", children: [ | |
{id: "4", children: [ | |
{id: "7", children: []} | |
]}, | |
{id: "6", children: []}, | |
]}, | |
{id: "3", children: [ |
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
// Iterative deepening DFS | |
const tree = { | |
id: "1", | |
children: [ | |
{id: "2", children: [ | |
{id: "4", children: [ | |
{id: "7", children: []} | |
]}, | |
{id: "6", children: []}, |
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 from 'react' | |
import PropTypes from 'prop-types' | |
import Radium from 'radium' | |
import styles from './styles' | |
const Checkmark = () => | |
<div style={{ width: '100%', height: 'auto', }}> | |
<svg viewBox="0 0 64 50" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink"> | |
<title>Path 2</title> | |
<desc>Created with Sketch.</desc> |
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
const california = { | |
'acalanes-ridge': | |
{ name: 'Acalanes Ridge', | |
id: 'acalanes-ridge', | |
stateAbbr: 'CA', | |
state: 'California' }, | |
acampo: | |
{ name: 'Acampo', | |
id: 'acampo', | |
stateAbbr: 'CA', |
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
let containerId | |
module.exports.hello = (event, context, callback) => { | |
if (!containerId) containerId = context.awsRequestId | |
console.log(containerId) | |
callback(null, { | |
statusCode: 200, | |
body: JSON.stringify({ |
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 { | |
StyleSheet, | |
Text, | |
View, | |
} from 'react-native'; | |
import Camera from 'react-native-openalpr'; | |
const styles = StyleSheet.create({ | |
container: { |
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
// Reducer.js | |
const initialState = { | |
user: { | |
email: null, | |
name: null, | |
}, | |
myForm: { // define our form in advance | |
input1: null, | |
input2: null, | |
}, |
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 from 'react' | |
import { View, TextInput, } from 'react-native' | |
export class Form extends React.PureComponent { | |
constructor(props) { | |
super(props) | |
this.state = { | |
input1: null, | |
input2: null, | |
} |