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
// Some explanation here https://medium.com/p/a928ca90f489 | |
import React from 'react'; | |
import { AppRegistry, asset, Pano, Text, View, VrHeadModel } from 'react-vr'; | |
const RCTDeviceEventEmitter = require('RCTDeviceEventEmitter'); | |
class WelcomeToVR extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { |
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
// Embedded in this article https://medium.com/p/c98e491015b6 | |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"time" | |
"github.com/graph-gophers/graphql-go" |
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 { Enhance } from "../components/Enhance"; | |
class MyComponent extends React.Component { | |
render() { | |
if (!this.props.data) return <div>Waiting...</div>; | |
return <div>{this.props.data}</div>; | |
} | |
} |
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
/* eslint-disable */ | |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
class App extends React.Component { | |
static displayName = `App`; | |
static propTypes = { | |
// eslint-disable-next-line react/forbid-prop-types | |
children: PropTypes.node.isRequired |
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 { render } from "react-dom"; | |
const PostContext = React.createContext(); | |
class PostProvider extends Component { | |
state = { | |
review: "bad" | |
}; | |
render() { |
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'; | |
class Cat extends React.Component { | |
render() { | |
const mouseposition = this.props.mouseposition; | |
return ( | |
<img src="https://dummyimage.com/30x30/000/fff" style={{ position: 'absolute', left: mouseposition.x -30, top: mouseposition.y -30 }} /> | |
); | |
} | |
} |
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
package main | |
import ( | |
"bufio" | |
"context" | |
"fmt" | |
"log" | |
"os" | |
"time" | |
) |
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'; | |
const initialData = "hello from initial data" | |
function iterateOverChildren(children) { | |
return React.Children.map(children, child => { | |
if (!React.isValidElement(child)) { | |
return child; | |
} | |
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
#! /bin/bash | |
# ------------------------------------------------------------ | |
# Downloads required packages | |
# ------------------------------------------------------------ | |
# Realize is a Golang Task Runner performing live reloading | |
if [ ! -f $GOPATH/bin/realize ] && [ ! -d $GOPATH/src/github.com/oxequa/realize ]; then | |
echo "Realize not found. Downloading it for you..." |
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
// PARENT | |
const query = graphql.experimental` | |
query MyRootComponentQuery($employeeId: String!, $includeOvertime: Boolean) { | |
employee(id: $employeeId) { | |
fullName | |
...MyFragmentComponent_employee @arguments(includeOvertime: $includeOvertime) | |
} | |
} | |
` |
OlderNewer