Skip to content

Instantly share code, notes, and snippets.


Carl von Buelow cvbuelow

View GitHub Profile
cvbuelow / reducers.js
Last active Jul 25, 2019 — forked from gaearon/reducers.js
Code splitting in Redux with SSR
View reducers.js
import { combineReducers } from 'redux';
import users from './reducers/users';
import posts from './reducers/posts';
// Inject the initial state for async loaded reducers
function injectState(reducers, preloadedState = {}) {
return Object.keys(reducers).reduce((finalReducers, key) => {
if (typeof reducers[key] === "function") {
finalReducers[key] = (state = preloadedState[key], action) => reducers[key](state, action);
cvbuelow /
Last active Aug 29, 2015
i18n in Angular


The i18n library is an AngularJS module composed of services and filters used to easily internationalize applications.



View get_cities.php
echo "<option>Knoxville</option>";
You can’t perform that action at this time.