Skip to content

Instantly share code, notes, and snippets.

View kristoferblack's full-sized avatar
🏖️
Chilling

Kristofer Black kristoferblack

🏖️
Chilling
View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

Meteor.startup(() => {
GlobalEmitter = new EventEmitter()
ReactRouterSSR.Run(renderRoutes, {
props: {
onUpdate() {
GlobalEmitter.emit('closeMobileNav')
ReactGA.pageview(this.state.location.pathname)
}
}
export const renderRoutes = (
<Route path="/" component={AppContainer}>
<IndexRoute component={HomeContainer} />
<Route path="work">
<IndexRoute component={WorkContainer} />
<Route path=":id" component={WorkDetailContainer} />
</Route>
<Route path="about" component={AboutContainer} />
<Route path="blog">
<IndexRoute component={BlogContainer} />
@kristoferblack
kristoferblack / index.jsx
Created July 21, 2016 21:54
RA About Page - React
import React from 'react'
import GlobalStore from '../../stores/global'
import GlobalActions from '../../actions/global'
import Hero from './blocks/Hero'
import ServicesGrid from './blocks/ServicesGrid'
import Ventures from './blocks/Ventures'
import LogoGrid from './blocks/LogoGrid'
@kristoferblack
kristoferblack / app.js
Last active July 21, 2016 21:44
RA About Page - view.js
RA.module("AboutApp", function(AboutApp, RA, Backbone, Marionette, $, _) {
AboutApp.Router = Marionette.AppRouter.extend({
appRoutes: {
"about": "index",
"about/": "index"
},
onRoute: function(name, path, args) {
RA.execute("set:navigation:activeItem", path);
}
});
@kristoferblack
kristoferblack / 0_reuse_code.js
Created December 10, 2013 17:28
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console