Skip to content

Instantly share code, notes, and snippets.

View mschipperheyn's full-sized avatar

Marc Schipperheyn mschipperheyn

View GitHub Profile
import React from 'react';
import { makeStyles } from '@material-ui/styles';
import Grid from '@material-ui/core/Grid';
const HIDDEN = 'hidden';
/**
* Hacky solution to deal with missing grid offset
*/
@mschipperheyn
mschipperheyn / server-middleware-reactApplication-ServerHTML.js
Created March 3, 2017 21:40
SSR Styled Components in React Universally
/**
* This module is responsible for generating the HTML page response for
* the react application middleware.
*/
/* eslint-disable react/no-danger */
/* eslint-disable react/no-array-index-key */
import React, { Children, PropTypes } from 'react';
import serialize from 'serialize-javascript';
import appRootDir from 'app-root-dir';
import AssetsPlugin from 'assets-webpack-plugin';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import nodeExternals from 'webpack-node-externals';
import path from 'path';
import webpack from 'webpack';
import WebpackMd5Hash from 'webpack-md5-hash';
import { happyPackPlugin } from '../utils';
import { ifElse } from '../../shared/utils/logic';
@mschipperheyn
mschipperheyn / package.json
Created March 2, 2017 15:53
configFactory.js
import appRootDir from 'app-root-dir';
import AssetsPlugin from 'assets-webpack-plugin';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import nodeExternals from 'webpack-node-externals';
import path from 'path';
import webpack from 'webpack';
import WebpackMd5Hash from 'webpack-md5-hash';
import { happyPackPlugin } from '../utils';
import { ifElse } from '../../shared/utils/logic';
@mschipperheyn
mschipperheyn / Marshaller
Created April 4, 2016 14:06
A marshalling function for Normalizr
`
'use strict';
const getEntity = function(id, key, entities){
const ent = entities[key][id];
if(ent === undefined || ent === null){
console.log(`Missing object ${key} ${id}`);
}
import React, { Navigator } from 'react-native';
import RouterRegistry from './RouterRegistry';
import navigateTo from './routerActions';
const BACK = 'BACK';
const FORWARD = 'FORWARD';
class Router extends React.Component {