Skip to content

Instantly share code, notes, and snippets.

View lmbuffetti's full-sized avatar

Luigi Mattia lmbuffetti

View GitHub Profile
@lmbuffetti
lmbuffetti / index.js
Last active December 6, 2019 16:03
Server Side Rendering
import bodyParser from 'body-parser';
import compression from 'compression';
import express from 'express';
import cookieParser from 'cookie-parser';
import Loadable from 'react-loadable';
import render from './render';
var request = require('request');
var fs = require("fs");
const app = express();
@lmbuffetti
lmbuffetti / dropdown.change.jsx
Created September 29, 2016 22:08 — forked from rippo/dropdown.change.jsx
ReactJS dropdown list example that gets data from a AJAX call with an on change event
var MyParentChange = React.createClass({
getInitialState: function() {
return {
data: [], value: {}, showOutput: false
}
},
componentDidMount: function() {
$.get(this.props.source, function(result) {