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 =>