Errata
The errata list is a list of errors and their corrections that were found after the product was released.
The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.
Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update
Version | Location | Description | Submitted by | Date submitted |
---|---|---|---|---|
N/A Chapter 3, Section "Recursion" |
At the end of the recursion section, there is a demonstration of each step of the deepPick function. The comment next to the function call (at the top of the code block) and the comment showing the result (at the bottom of the block) both say the result is "Deacon". But the function is fetching the "first" parameter of the name object, which is "Dan". |
Chris Fincher | Jun 13, 2020 | |
N/A Ch. 6, Section "Sending State Down a Component Tree" |
The code block defining the StarRating function uses a function called onRate. onRate is not defined and added to the rest of the code until the next section. |
Chris Fincher | Jun 23, 2020 | |
ePub | Page Ch. 6 Roughly halfway through |
export default function ColorList({ colors = [], onRemoveColor = f => f }) { |
Charles Bolton | Jul 26, 2020 |
ePub | Page N/A Chapter 6 section on Refs "Controlled components" |
"In a controlled component, the from values are managed by React..." |
Charles Bolton | Jul 27, 2020 |
ePub | Page N/A Chapter 6 section "adding colors to state" |
"Both the controlled form component and the uncontrolled from component pass" |
Charles Bolton | Jul 27, 2020 |
ePub | Page N/A Ch.8 |
formData.append("fullname", "Alex Banks"); |
Charles Bolton | Aug 01, 2020 |
? Ch 2, Destructuring Objects |
The first code example assigns the destructured variables with `const { bread, meat } = ... |
Jon Riddle | Aug 05, 2020 | |
Ch. 1 Chapter 1, 6th paragraph |
"We’re talking Uber, Twitter, Airbnb, and Twitter" |
Anonymous | Aug 14, 2020 | |
? Ch 5 (JSX), Intro to Webpack, 3. CREATING THE WEBPACK BUILD |
> The configuration file should be saved to the root folder of the project, right next to the index.js file |
Jon Riddle | Aug 16, 2020 | |
? Ch 5 (JSX), Intro to Webpack, 3. CREATING THE WEBPACK BUILD |
The code listing for adding a build script to package.json is |
Jon Riddle | Aug 16, 2020 | |
? Ch 5 (JSX), Intro to Webpack, Loading the Bundle |
This section appears to contain some path inconsistencies: |
Jon Riddle | Aug 16, 2020 | |
Ch 8 Chapter 8, Saving Data Locally |
The code sample of the GitHubUser component that saves to localStorage only works in the sandbox because the login property given (moonhighway) differs in case from the GitHub username (MoonHighway). If the property is given with the same case as the login returned by GitHub, line 11 (in the sandbox; `if (data.login === login) return;`) returns as soon as data is loaded and it never saves to local storage, so data is always loaded from GitHub and much frustration ensues. |
Jon Riddle | Sep 06, 2020 | |
Ch 8 Chapter 8, Handling Multiple Requests |
After the second code block in this section, the text reads 'In this case, the initial letter is "b"' - that should be "a". |
Jon Riddle | Sep 06, 2020 | |
Ch 8 Ch 8, socket.io example |
The socket.io code sample listens for a 'disconnecting' event - should be 'disconnect'. |
Jon Riddle | Sep 13, 2020 | |
Ch 10 Ch 10, PropTypes |
The code sample that is prefaced with "For example, if we used a boolean:" uses a string, but reports the error that would appear if the code had used a boolean as described. |
Jon Riddle | Sep 27, 2020 | |
Ch 10 Ch 10, Flow |
The two code samples under "This warning exists because if document.getElementById("root") returns null, the app will crash." appear to differ only in the inclusion of the conditional around .render(). What is the typecheck referred to in the second code sample? |
Jon Riddle | Sep 27, 2020 | |
ePub | Page N/A Chapter 4, 2nd paragraph |
The intro to Chapter 4 (How React Works) says: |
Enrique Matías Sánchez | Oct 06, 2020 |
n/a below Array.reduceRight |
The explanation refers to an array called distinct. The array name is "unique". |
Bríd Deely | Feb 12, 2021 | |
Chapter 10 Github repostitory links |
In the "View the Code" links in the repository for Chapter 10, The links go to MoonHighway/learning-react/blob/master/chapter-10/in-the-flow (note the blob, and this happens on all view the code links) sends you to a 404 page. |
Anonymous | Mar 15, 2023 | |
Page Page 245 Chapter 7 section "Rules to Follow with Hooks" |
function Counter() { |
Wang Zhuojian | Feb 22, 2024 | |
O'Reilly learning platform | Page When to useLayoutEffect middle |
Syntax error. The first line omits parentheses after the function name: |
Linda Pescatore | Aug 01, 2024 |
O'Reilly learning platform | Page When to useLayoutEffect lower middle |
Syntax error. Parentheses omitted after useMousePosition: |
Linda Pescatore | Aug 01, 2024 |
O'Reilly learning platform | Page Improving code with useReducer several paragraphs down |
After presenting the Checkbox component with `toggle` instead of setChecked for the onChange function as follows, |
Linda Pescatore | Aug 03, 2024 |
O'Reilly learning platform | Page shouldComponentUpdate and PureComponent near end of chapter 7 |
No closing parentheses for the callback function. |
Linda Pescatore | Aug 04, 2024 |
O'Reilly learning platform | Page Chapter 8 Upload Files section |
Typo: forData on line 4 should be formData: |
Linda Pescatore | Aug 04, 2024 |
O'Reilly learning platform | Page Chapter 3 Second to the last paragraph in Data Transformations subsection |
"distinct" should be corrected into "unique". |
Youchen Ren | Aug 23, 2024 |
PDF, ePub | Page Chapter 4, React Components Example before React components: A historical tour |
The function does need parameter to pass the properties to the React component |
Kem Apak | Sep 03, 2024 |
Printed | Page 1 6th paragraph |
The sentence, "We're talking Uber, Twitter, Airbnb, and Twitter" has Twitter twice. Should replace one of the Twitters with Facebook or another huge company that uses React. |
Anonymous | Jul 24, 2020 |
Page 2 P25 |
In the section of Async/Await, the getFakePerson function expression you write, I find that you missed a "await" before "res.json()". Otherwise the result in console of getFakePerson() is always undefined since the "res" is undefined before the await of fetch(...), so you cannot get "results" from res.json(). |
Edward Li | Mar 28, 2021 | |
6 chapter 6 Using Refs |
Chapter 6 |
Judy | Jun 15, 2020 | |
Printed, Mobi | Page 9 Last paragraph |
At "container = document.getElement...", it should be made clear that the element "container" is to be supplied in the HTML, or somewhere, otherwise it is just 'null', and appendChild() doesn't work. |
John Wheater | Dec 31, 2020 |
Printed | Page 25 Both code examples in page 25 |
Missing 'await' operator before 'res.json();' |
Anonymous | Oct 23, 2020 |
Printed | Page 26 2nd code block |
There is an extra closing parenthesis at the end of the getPeople(5) code block. |
Milla Zagorski | Jan 02, 2021 |
Printed, PDF, ePub | Page 26 1st code listing: the getPeople function, line 9 |
In the `request.onload` function, if the `request.status` is not 200, we need to call `rejects(…)` instead of `reject(…)` on line 9. |
Marius Butuc | Apr 20, 2021 |
Printed | Page 28 1st code block, the code output comment |
The code output comment, as printed in the book, of "// Chile will take 7 days." might be more accurate and clear as: "// Santiago, Chile will take 7 days." |
Milla Zagorski | Jan 02, 2021 |
Printed | Page 29 3rd code block |
As printed in the book: "log("logging a message");" is missing the "timestamp" variable. |
Milla Zagorski | Jan 02, 2021 |
Printed | Page 30 1st coe block |
As printed in book, there are two missing equal signs and there is a closing curly bracket that should be a closing parenthesis: |
Milla Zagorski | Jan 02, 2021 |
Printed | Page 34 3rd paragraph |
const string = "Restaurants in Hanalei"; |
Øivind Hagen | Aug 16, 2020 |
Printed | Page 53 3rd line |
The code has `let time` twice (on lines 3 & 6 on page 53), which causes "SyntaxError: Identifier 'time' has already been declared". |
Anonymous | Jul 25, 2020 |
Printed | Page 55 Line 20 in prependZero code snippet |
in prependZero declaration, key needs to be in brackets otherwise the "key" field is set, and not the actual key field name passed in (e.g. hours). |
Anonymous | Jul 25, 2020 |
Printed | Page 57 2nd Paragraph, 5th sentence |
Quote: |
Alex Kozin | Jul 17, 2021 |
Printed | Page 67 1st block of code |
ReactDOM.render( |
Stefano G | Jan 27, 2021 |
Other Digital Version | 67 The code of function IngredientsList() |
This is the corrected version of the code .I changed items for secretIngredients |
Gustavo Rojas | Dec 31, 2021 |
Printed | Page 75 in data array under ingredients |
The salmon and whitefish measurement should be "lb" not "l lb". |
Anonymous | Jul 26, 2020 |
Printed | Page 93 1st paragraph |
The first paragraph on p. 93 says the bundle file path is ./dist/bundle.js, but the code at the bottom of p. 92 that creates the path using path.join has 'assets' dir in the path (./dist/assets/bundle.js). |
Anonymous | Aug 01, 2020 |
Printed | Page 99 1st paragraph |
“files” should be “fills” in the last sentence of the first paragraph. |
Anonymous | Aug 01, 2020 |
Printed | Page 99 Middle |
In the paragraph after the code `const createArray = length => [...Array(length)];` it says, "Here, we added the createArray function from Chapter 2." That function does not appear in Chapter 2 in either the print or online version, nor does it appear in any other chapter, according to an online search. |
Linda Pescatore | Jun 08, 2024 |
Printed | Page 105 2nd paragraph |
The word properties is repeated in “... other common properties properties to the entire star rating” |
Anonymous | Aug 03, 2020 |
Page 125 Code example |
Code example does not work (starting with data on prior page): |
Anonymous | Mar 05, 2021 | |
Page 125 Code Example |
Another solution to the failed IngredientsList code example (see errata for PDF, page 125, Code Example, Mar 05, 2021), is to pass props into the component function, instead of replacing it with a class: |
Anonymous | Mar 05, 2021 | |
Printed | Page 154 4th paragraph |
The URL https://oreil.ly/1UNct redirects to https://chrome.google.com/webstore/detail/react-developer-tools/ which is a 404 Not Found page. |
Anonymous | Nov 27, 2021 |
Printed | Page 177 1st header |
The header, as printed in the book, of "Memozing Values" appears to be missing an "i" and might be corrected as "Memoizing Values". |
Milla Zagorski | Jan 02, 2021 |
ePub | Page 179 UserRepositories implementation |
The UserRepositories implementation is not passing the login to the RepoMenu component. This breaks the RepositoryReadme component that happens a few pages later in the book and the react markdown will not load. |
Anonymous | Oct 01, 2020 |
Page 217 2nd code sample |
3rd line of code: |
Ben Rand | Feb 02, 2021 | |
Printed | Page 262 Code sample following 1st paragraph |
The function for the Services component is missing the return keyword. |
Jason Gero | Feb 27, 2022 |
Printed | Page 280 Code sample with NPM scripts |
Folder name in which index.js file is placed is erroneously given as "server-build". It should be "build-server" to match what is in the webpack.server.js file on the previous page. |
Jason Gero | Mar 06, 2022 |
Page 297 Handling Multiple Requests ~ p297 |
In this case, the initial letter is “b.” <------ (!!!) If the user invokes next, the |
Anonymous | Oct 05, 2020 | |
Page 312 component UserRepositories from React Markdown example |
|
Anonymous | Oct 05, 2020 |