Skip to content

Instantly share code, notes, and snippets.

View brentvatne's full-sized avatar
😴
☕️⚛️🏃‍♂️🐶

Brent Vatne brentvatne

😴
☕️⚛️🏃‍♂️🐶
View GitHub Profile
@ptaoussanis
ptaoussanis / reagent-component.cljs
Created February 3, 2014 10:49
Reagent component util
(defn component
"Experimental! A Reagent 'component' is a (fn [& [props children this]]) that:
* May have special metadata for React lifecycle methods.
* Returns either Hiccup data, or a nested (usu. post-setup) component[1].
This util makes writing Reagent components a little more convenient:
(component
:render (fn [node_ & cmpt-args]) -> Hiccup data, or nested component[1].
;; Additional methods optional:
:did-mount (fn [node])
@jquense
jquense / app.js
Last active August 29, 2015 14:26
implementation of redux's combineReducers adding flux waitFor()
import { createStore } from 'redux';
import combineReducers from './combineReducers';
let Store = createStore(combineReducers({
reducerA(state = 0, action, waitFor){
if ( action.type === 'TEST'){
waitState = waitFor(waitFor.reducerB)
if ( waitState.reducerB === 5 )
state = 10
@fson
fson / rapid-prototyping-with-relay.md
Created October 18, 2015 20:08
Rapid prototyping with Relay (Reactive 2015 lightning talk proposal)

This is a proposal for a lightning talk at the Reactive 2015 conference.

NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut!

Rapid prototyping with Relay

Relay makes data fetching in React apps simpler, by letting you declare the data needs of your components instead of writing complex imperative code. React, Relay, GraphQL and the other complementary tools are changing how apps are built.

@dglazkov
dglazkov / gist:fee1dcb9690baf73dff0
Last active April 13, 2016 03:15
Multiple-actor Problem

Definition of the Multiple-actor Problem

The Multiple-actor Problem (MAP) occurs in a web application that contains multiple bits of code, each assuming that they are the only actor in the document. The problem manifests when these assumptions conflict with each other.

Some examples:

  • A web app is written in framework A, then later an analytics script B is added. A makes assumptions about lifetime of elements and handling of events. B is not aware of these assumptions and subtly violates them, causing jank (example)
  • A web app is written using framework A. Attempting to introduce a widgets built using framework B results in weird errors, because B is violating A's assumptions about control of document state (examples 1, [2](http://stackoverflow.com/questions/254
//
// native.m
// yolo
//
// Created by Soheil Yasrebi on 4/1/15.
// Copyright (c) 2015 Facebook. All rights reserved.
//
#import "RCTBridge.h"
#import "RCTBridgeModule.h"
@danharper
danharper / BorderedInput.js
Last active May 16, 2016 20:31
BorderedInput, with Material design style focus animation. Preview: https://i.imgur.com/Fek7rXF.gif
// note there may be a better way to abuse flexbox than this :)
var React = require('react-native')
var { View, TextInput } = React
var BorderedInput = React.createClass({
getInitialState() {
return { i: 0 }
},
@panurge-ws
panurge-ws / gist:525caef640784a487aa2
Last active May 20, 2016 10:38
A Videgular plugin to emulate background-size CSS property for video (see comment below).
/*
* vg-bkg-size
* A Videogular plugin to emulate background-size CSS property for video: "cover" or "contain"
*
* Use:
* <videogular vg-bkg-size="cover" center="true"></videogular>
* vg-bkg-size => "cover" or "contain"
* center => true or false
*
* Copyright (c) 2014 Panurge Web Studio

I would like to propose a lightning talk for the Reactive Conference demonstrating how you can interact with Arduino and/or Raspberry Pi GPIO's using React Native.

Here's is an example video where fellow speaker Brent Vatne controls my arduino device remotely using a sample react native app that can be found here

Thank you, @christopherdro

@frostney
frostney / talk.markdown
Last active September 22, 2016 12:01
ReactiveConf 2016 Lighting talk proposal: React (Native) and the cross platform pipe dream

This is a lighting talk proposal for ReactiveConf 2016: https://reactiveconf.com/

React (Native) and the cross platform pipe dream

Have one codebase, target all the platforms. While we are on the topic on re-using the same codebase, maybe we could even switch out the renderer with what is the fatest for the situation. Use DOM, Canvas or OpenGL whenever needed. This lighting talk will give impulses on how to approach this mantra and what advantages and disadvantages we might run into in the process.

(Content-wise this lighting talk is a shorter version of https://github.com/frostney/talks/blob/master/proposals.md#can-we-stop-using-lowercased-components-now.)

@knowbody
knowbody / changelog_SDK13.md
Created January 17, 2017 13:21
Exponent SDK12 -> SDK13 upgrade (stuff I found out in my codebase)