diff --git a/1-basic-react/webpack.config.js b/1-basic-react/webpack.config.js index 916380db..6ba7dd8f 100644 --- a/1-basic-react/webpack.config.js +++ b/1-basic-react/webpack.config.js @@ -4,7 +4,7 @@ var path = require('path'); module.exports = { context: path.join(__dirname, "src"), - devtool: debug ? "inline-sourcemap" : null, + devtool: debug ? "inline-sourcemap" : false, entry: "./js/client.js", module: { loaders: [ @@ -25,7 +25,7 @@ module.exports = { }, plugins: debug ? [] : [ new webpack.optimize.DedupePlugin(), - new webpack.optimize.OccurenceOrderPlugin(), + new webpack.optimize.OccurrenceOrderPlugin(), new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: false }), ], }; diff --git a/5-redux-react/src/js/actions/tweetsActions.js b/5-redux-react/src/js/actions/tweetsActions.js index cba31e31..87926d0f 100644 --- a/5-redux-react/src/js/actions/tweetsActions.js +++ b/5-redux-react/src/js/actions/tweetsActions.js @@ -2,7 +2,15 @@ import axios from "axios"; export function fetchTweets() { return function(dispatch) { - axios.get("http://rest.learncode.academy/api/test123/tweets") + dispatch({type: "FETCH_TWEETS"}); + + /* + http://rest.learncode.academy is a public test server, so another user's experimentation can break your tests + If you get console errors due to bad data: + - change "reacttest" below to any other username + - post some tweets to http://rest.learncode.academy/api/yourusername/tweets + */ + axios.get("http://rest.learncode.academy/api/reacttest/tweets") .then((response) => { dispatch({type: "FETCH_TWEETS_FULFILLED", payload: response.data}) }) diff --git a/5-redux-react/src/js/components/Layout.js b/5-redux-react/src/js/components/Layout.js index 41517fb3..8d416cd7 100644 --- a/5-redux-react/src/js/components/Layout.js +++ b/5-redux-react/src/js/components/Layout.js @@ -27,7 +27,7 @@ export default class Layout extends React.Component { return } - const mappedTweets = tweets.map(tweet =>
  • {tweet.text}
  • ) + const mappedTweets = tweets.map(tweet =>
  • {tweet.text}
  • ) return

    {user.name}

    diff --git a/6-mobx-react/webpack.config.js b/6-mobx-react/webpack.config.js index 7c467bef..de21163e 100644 --- a/6-mobx-react/webpack.config.js +++ b/6-mobx-react/webpack.config.js @@ -12,6 +12,7 @@ module.exports = { test: /\.js$/, exclude: /(node_modules|bower_components)/, loader: 'babel-loader', + query: { presets: ['es2015', 'react'], plugins: ["transform-decorators-legacy", "transform-class-properties"] } }, { test: /\.css$/, loader: "style-loader!css-loader" }, ]