Skip to content

Instantly share code, notes, and snippets.

@alicia
alicia / single_page_app_routing.jsx
Created July 26, 2015 18:22
routing example for single page app using React and Reflux
var ChangeRoute = Reflux.createAction();
var Route = Reflux.createStore({
init: function() {
this.listenTo(ChangeRoute, this.onChangeRoute);
},
onChangeRoute: function(route) {
window.history.pushState(null, null, route);
this.trigger(route);
@alicia
alicia / spacing.scss
Created July 3, 2015 20:52
css spacing - generates classes to add small, medium, and large margin and padding
$spacing-small: 10px;
$spacing-medium: $spacing-small * 2;
$spacing-large: $spacing-small * 4;
$size-map: (
's': $spacing-small,
'm': $spacing-medium,
'l': $spacing-large,
);