Skip to content

Instantly share code, notes, and snippets.

View krisaoe's full-sized avatar
:octocat:

krisaoe krisaoe

:octocat:
  • Tidetech
  • Tasmania, Australia
View GitHub Profile
@krisaoe
krisaoe / Enhance.js
Created January 22, 2017 15:36 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@krisaoe
krisaoe / on-jsx.markdown
Created January 22, 2017 15:36 — forked from chantastic/on-jsx.markdown
JSX, a year in

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 lead 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'

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@krisaoe
krisaoe / frp.md
Created January 22, 2017 15:36 — forked from ohanhi/frp.md
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

[
{
"title": "Webpack 2 + PostCSS + cssnext",
"author": "Drew Powers",
"url": "https://blog.madewithenvy.com/webpack-2-postcss-cssnext-fdcd2fd7d0bd#.9f1xz34x1"
},
{
"title": "10 Awesome PostCSS Plugins to Make You a CSS Wizard",
"author": "Anna Monus",
"url": "http://www.hongkiat.com/blog/postcss-plugins/"
@krisaoe
krisaoe / react_redux_cheatsheet.jsx
Created November 28, 2016 14:07
React+Redux cheat sheet
// ************************************** redux **********************************************
import { applyMiddleware, createStore } from 'redux';
const reducer = (state, action) => {
switch (action.type) {
case 'FOO': { return action.bar; }
};
return state;
};