reactjs101
reactjs101 copied to clipboard
從零開始學 ReactJS(ReactJS 101)是一本希望讓初學者一看就懂的 React 中文入門教學書,由淺入深學習 ReactJS 生態系 (Flux, Redux, React Router, ImmutableJS, React Native, Relay/GraphQL etc.)。
"Refs 與表單處理"章節中提到的ref用法,在react官網上https://facebook.github.io/react/docs/refs-and-the-dom.html 已經不建議使用了,節錄如下: If you worked with React before, you might be familiar with an older API where the ref attribute is a string, like "textInput", and the DOM node...
错误代码如下 `Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the...
## 项目中的的AppBarContainer代码有误 ````javascript dispatch(setRecipe({ key: 'recipeId', value: '' })); //改成 dispatch(setRecipe({ keyPath: ['recipe', 'id'], value: '' })); ```` > 另外,我很奇怪,为嘛WebAPI的action,dispatch后,使用路由跳转,为啥要页面重新加载一次。。。 ````javascript window.location.reload(); browserHistory.push('/'); ```` 这样不就失去单页应用的意义了?而且项目操作起来很不顺畅。。感觉不是这样用的
At page [CH7](https://github.com/kdchang/reactjs101/blob/master/Ch07/react-redux-real-world-example.md). 1. Code in "src/actions/todoActions.js". "CREATE_TODO , DELETE_TODO, CHANGE_TEXT" are used as string. ``` export const createTodo = createAction('CREATE_TODO'); export const deleteTodo = createAction('DELETE_TODO'); export const changeText =...
Main.js does not work and I have no idea how to continue on that. Thanks
Im new to javascript, but I can only make it work after changing it to `const rootReducer = combineReducers({ 'todo': todoReducer });` I believe mapStateToProps(state) in TodoHeaderContainers is trying to...
您好,我最近開始學 React,使用上遇到一個問題 我直接使用 babel-standalone 在 jsx 裡面寫 import 會出現需要 require.js 的錯誤 `Uncaught ReferenceError: require is not defined` 然後我把 require.js 放到 script 去之後再的話會出現類似這樣的錯誤 `Module name "..." has not been loaded yet...
若依教學順序做下來,到第7點會無法執行local的webpack
可以改用 react-hot-loader https://github.com/gaearon/react-hot-loader
Author 你好,我在阅读CH09教程中发现了一个小错误,望修正以便于他人查阅。 react-router-redux-github-finder.md 原文中第397行: > 以下是 `src/components/ResultPage/ResultPage.js`: 因为下文中代码为HomePage.js内容,所以这行内容应相应改成: > 以下是 `src/components/HomePage/HomePage.js`: