Skip to content

Instantly share code, notes, and snippets.

View potaty's full-sized avatar
🕶️

Lu Liang potaty

🕶️
  • Meta
  • Cupertino, California
View GitHub Profile
@ozluy
ozluy / webpack.config.js
Last active January 11, 2018 05:58
React Multiple Entry and Output with Webpack-3
var path = require('path');
var APP_PORT = 1453;
module.exports = {
context: __dirname + "/src",
entry: {
/**
READ THE COMMENT
index: "./react/views/index.js"
@DimitryDushkin
DimitryDushkin / react-router-queyry-utils.js
Last active March 5, 2021 13:38
React router utility functions to add and remove queries
import { browserHistory } from 'react-router';
/**
* @param {Object} query
*/
export const addQuery = (query) => {
const location = Object.assign({}, browserHistory.getCurrentLocation());
Object.assign(location.query, query);
browserHistory.push(location);
};