Skip to content

Instantly share code, notes, and snippets.

♻️
obsessing over statecharts

Stephen Bussard sbussard

♻️
obsessing over statecharts
Block or report user

Report or block sbussard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View react-lifecycle.md
Name of thing Sorta like... Mounted? Can you even setState? What would you say... ya do here?
constructor initialize() nope nope init stuff NO side effects
componentWillMount beforeDomReady() nope yeah but don't Only needed in createClass now use constructor for most things
render render nope please no render stuff and don't set any state please
componentDidMount domReady() yup yup DOM is a go init jQuery plugins dispatch stuff
componentWillReceiveProps onChange() yup yup
@nikcub
nikcub / README.md
Created Oct 4, 2012
Facebook PHP Source Code from August 2007
View README.md
View gist:2597326

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@wilsonpage
wilsonpage / reqUrl.js
Created Nov 25, 2011
A function I made that wraps the node http.request function to make it a little more friendly. In my case I am using it for API route testing.
View reqUrl.js
// module dependencies
var http = require('http'),
url = require('url');
/**
* UrlReq - Wraps the http.request function making it nice for unit testing APIs.
*
* @param {string} reqUrl The required url in any form
* @param {object} options An options object (this is optional)
@sbussard
sbussard / snippets.less
Last active Sep 26, 2015
css3 snippet
View snippets.less
.no-select {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
.no-drag {
-webkit-touch-callout: none;
You can’t perform that action at this time.