Skip to content

Instantly share code, notes, and snippets.

View CatherineThompson's full-sized avatar

Catherine Thompson CatherineThompson

View GitHub Profile
import React, { Component } from 'react';
import './App.css';
import ReactMapGL from 'react-map-gl';
const MAPBOX_TOKEN = [TOKEN];
let cancelAnimation = null;
class App extends Component {
state = {
viewport: {
import React from 'react'
const fruitList = ['pineapple', 'strawberry', 'banana', 'peach']
const vegetableList = ['peas', 'carrots', 'broccoli']
class App extends React.Component {
render() {
return (
<div>
</div>
import React from 'react'
import { timer } from 'rxjs'
import { map } from 'rxjs/operators'
const fruitList = ['pineapple', 'strawberry', 'banana', 'peach']
const vegetableList = ['peas', 'carrots', 'broccoli']
class App extends React.Component {
fruit = timer(0, 2000).pipe(
import React from 'react'
import { Observable, Subscription } from 'rxjs'
interface Props<T> {
observable: Observable<T>
children: (value: T) => any
}
interface State<T> {
value: T | null
import React from 'react'
import { timer } from 'rxjs'
import { map, combineLatest } from 'rxjs/operators'
import ObservableView from './rxjs-helpers/ObservableView'
const fruitList = ['pineapple', 'strawberry', 'banana', 'peach']
const vegetableList = ['peas', 'carrots', 'broccoli']
class App extends React.Component {
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
{
"timestamp" : "2019-08-25T23:44:16.194Z",
"readings" : [
{
"altitude" : 133723,
"timestamp" : "2019-08-25T23:43:14.006Z",
"time-zone" : "America/Denver",
"lat-lng" : {
"lat" : 40.626489862047379,
"lng" : -111.88507696701031
{
"timestamp" : "2019-11-10T20:44:16.194Z",
"readings" : [
{
"altitude" : 133723,
"timestamp" : "2019-11-10T20:40:14.722Z",
"time-zone" : "America/Denver",
"lat-lng" : {
"lat" : 40.626489862047379,
"lng" : -111.88507696701031
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export function withAppContext<
P extends { appContext?: AppContextInterface },
R = Omit<P, 'appContext'>
>(
Component: React.ComponentClass<P> | React.StatelessComponent<P>
): React.SFC<R> {
return function BoundComponent(props: R) {
return (