- VirtualBox
- Vagrant
- Packer
- a Mac with a lot of Memory/CPU/Disk
- great Templates/Tools from https://github.com/timsutton/osx-vm-templates
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't
/** | |
* Pair | |
* @todo Implement algebraic structures: Setoid, Functor | |
*/ | |
var Pair = function(fst, snd) { | |
if (this instanceof Pair) { | |
if (Array.isArray(fst) && fst.length === 2 && typeof snd == 'undefined') { | |
this[0] = fst[0]; | |
this[1] = fst[1]; | |
} else { |
You got your hands on some data that was leaked from a social network and you want to help the poor people.
Luckily you know a government service to automatically block a list of credit cards.
The service is a little old school though and you have to upload a CSV file in the exact format. The upload fails if the CSV file contains invalid data.
The CSV files should have two columns, Name and Credit Card. Also, it must be named after the following pattern:
YYYYMMDD
.csv.
var React = require('react'); | |
var Ridiculous = React.createClass({ | |
getInitialState () { | |
console.log(this.props.name, 'getInitialState'); | |
return { foo: true }; | |
}, | |
render () { | |
console.log(this.props.name, 'render'); |
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
} | |
NodeList.prototype.__proto__ = Array.prototype; |
CREATE OR REPLACE FUNCTION table_update_notify() RETURNS trigger AS $$ | |
DECLARE | |
id bigint; | |
BEGIN | |
IF TG_OP = 'INSERT' OR TG_OP = 'UPDATE' THEN | |
id = NEW.id; | |
ELSE | |
id = OLD.id; | |
END IF; | |
PERFORM pg_notify('table_update', json_build_object('table', TG_TABLE_NAME, 'id', id, 'type', TG_OP)::text); |
/* | |
The MIT License (MIT) | |
Copyright (c) 2014 | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
This is a companion Gist for a talk that I gave at React Berlin in April 2015. The fine folks at Bitcrowd recorded all three of the evening's talks, so you can watch mine at https://www.youtube.com/watch?v=9ArhJiMGVDc.
Peter Magenheimer (@peterjmag)
I'm a front end developer at ResearchGate. And yes, we're hiring.
// for an updated version see https://github.com/jsdf/react-native-refreshable-listview | |
var React = require('react-native') | |
var { | |
ListView, | |
ActivityIndicatorIOS, | |
StyleSheet, | |
View, | |
Text, | |
} = React |