Skip to content

Instantly share code, notes, and snippets.

@damienwebdev
Last active May 1, 2016 00:42
Show Gist options
  • Save damienwebdev/4e3876f45877119ab147b004f2ae9a28 to your computer and use it in GitHub Desktop.
Save damienwebdev/4e3876f45877119ab147b004f2ae9a28 to your computer and use it in GitHub Desktop.
import React from 'react';
import ReactDOM from 'react-dom'
import Todo from 'Todo';
export const TodoList = ({todos, onTodoClick}) => (
<ul>
{todos.map(todo => <Todo key={todo.id} {...todo} onClick={() => onTodoClick(todo.id)} />)}
</ul>
);
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./src/app/index.jsx'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
module: {
loaders: [{
test: /\.jsx$/,
loaders: ['react-hot', 'babel'],
include: path.join(__dirname, 'src/app')
}]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment