Skip to content

Instantly share code, notes, and snippets.

View joevo2's full-sized avatar
⚛️
React-ing to Go

Joel joevo2

⚛️
React-ing to Go
View GitHub Profile
// Chrome dev tools
let list
list = document.querySelectorAll("body > div.RnEpo.Yx5HN > div > div.isgrP > ul > div > li > div > div.t2ksc > div.RR-M-.SAvC5 > a")
let usernames = []
for (var value of list.values()) {
usernames.push(value.getAttribute("href"))
}
// Store as global variable
@joevo2
joevo2 / inlineShortCircuitObjectSpread.txt
Last active March 18, 2019 04:04
Inline ternary object spread
{
a: 1,
...(true && { b: 2 }),
}
@joevo2
joevo2 / HomeScreen.js
Created January 20, 2019 11:23
Tutorial
import React from "react";
import { View, StyleSheet, ScrollView, Text } from "react-native";
export default class HomeScreen extends React.Component {
static navigationOptions = {
title: "Spending"
};
render() {
return (
@joevo2
joevo2 / react.html
Last active November 22, 2017 10:59
HTML only React.js
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div id="app"></div>
<script src="https://unpkg.com/react@16.1.0/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@16.1.0/umd/react-dom.production.min.js"></script>
validateCoupon = async (id) => {
let _this = this;
var Comments = Parse.Object.extend("Comments");
var query = new Parse.Query(Comments);
query.equalTo("objectId", id);
await query.first({
success: function (results) {
results.save(null, {
success: function (results) {
// Now let's update it with some new data. In this case, only cheatMode and score
import React from 'react';
import {
View,
Text,
TouchableOpacity
} from 'react-native';
import { ButtonGroup, CheckBox } from 'react-native-elements'
import FloatLabelTextInput from '../../components/react-native-floating-label-text-input';
@joevo2
joevo2 / GuestInfo.js
Created November 25, 2016 15:49
Paradise
import React from 'react';
import {
View,
Text,
} from 'react-native';
import { ButtonGroup } from 'react-native-elements'
import FloatLabelTextInput from '../../components/react-native-floating-label-text-input';
import { Global } from './Styles';
import Exponent from 'exponent';
import React from 'react';
import {
AppRegistry,
Platform,
StatusBar,
StyleSheet,
View,
} from 'react-native';
import {
  • @joevo2/komas

  • @ccheever/vector-icon-showcase

  • @cchever/gistexp

  • @playground/rnplay

  • @mastermo/instagram-stories

@joevo2
joevo2 / setData.js
Last active October 11, 2016 12:59
This is just about scope :)
setData = data => {
console.log('setData', data)
this.setState({ test: data })
}
getData = () => {
const setData = this.setData
Axios
.get('...')