Skip to content

Lessons cleanup: grammar, factual accuracy, code bugs, hygiene - #183

Merged
alpersonalwebsite merged 4 commits into
masterfrom
lessons-and-repo-cleanup
May 9, 2026
Merged

Lessons cleanup: grammar, factual accuracy, code bugs, hygiene#183
alpersonalwebsite merged 4 commits into
masterfrom
lessons-and-repo-cleanup

Conversation

@alpersonalwebsite

@alpersonalwebsite alpersonalwebsite commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

Comprehensive cleanup pass over the lesson markdown files (00_*12_*), the README, and the repository config files. No content was added; existing lessons were corrected and tightened. Every change is verifiable against current React/Redux/JS docs.

Lessons (00_–12_)

  • Grammar / typo pass across all lessons. Spanish-calque "if not, ..." rewritten to "but rather, ..."; "in deep" → "in depth"; "Programing" → "Programming"; "cristal" → "crystal"; "componenDidMount" → "componentDidMount"; "patten" → "pattern"; "thorugh" → "through"; "advice" → "advise"; "you/your"; "ouput/outpout" → "output"; "remember you" → "remind you"; "What is Destructure" → "Destructuring"; "Name export" → "Named export"; and many similar copy-edit fixes.
  • 06_lifecycle-events.md — replaced the conflated single "Order of execution" list with three separate phases (Mounting, Updating, Unmounting). Removed componentWillUnmount() from the deprecated list (it is not deprecated) and renamed the actually-deprecated entries to their UNSAFE_* form.
  • 02_0_components.md — replaced the "functional components perform better" claim with the real reasons to prefer them (hooks API, no this-binding, less boilerplate, easier composition). Switched the naming guidance to PascalCase / camelCase. Closed unclosed JSX tags in the Composition example. Added the missing import React from 'react' to the HOC example.
  • 02_1_props.md — copy state before sorting ([...this.state.users].sort(...)) to avoid mutating it; wrapped the <li> map output in a <ul>; added a modern-React note about preferring componentDidUpdate / useEffect over the setState callback.
  • 03_local-state.md — clarified setState shallow merge with a nested-object example; rewrote the bind(null, ...) explanation (strict-mode this, lexically-bound class field arrow functions).
  • 01_1_elements.md — corrected createElement signature to variadic children; rewrote "object representation of a DOM node" to cover components too; declared HelloWorld with const.
  • 05_controlled-components.md — clarified that the form-fields-in-URL behavior only happens with method="GET"; POST puts them in the body.
  • 08_redux.md — distinguished currying from partial application; fixed the count of nested functions in the example note; added compose to the redux import where the snippet referenced it; addToTotal now uses its amount argument (was hardcoded to 10); functional App now returns its JSX (was a no-return statement body); added a note clarifying that the duplication-on-dispatch is intentional for the demo, not how a real reducer should be written; moved .env guidance to the project root and recommended excluding it from git.
  • 09_packages.md — rewrote the contradictory PropTypes "we should not / we can choose" sentence; added the missing import axios from 'axios'; fixed the bogus type: FETCH_WEATHER to FETCH_COMMENTS; added a heads-up that redux-promise is archived and pointing to redux-thunk / Redux Toolkit.
  • 11_webpack.md — added missing comma in splitChunks.cacheGroups.vendor; prefereorderPreference (real express-static-gzip option name); fixed srcimages/ and '.images/...' to src/images/ and './images/...'; '@babel/react''@babel/preset-react' for consistency with .babelrc; dropped the unused App from the './app' import; promoted ##From... to a real heading; misc typos (webpackHotMiddleware, npm start, Standardization, configuration, within, etc.).
  • 00_3_intro_es2015.md — declared addFriendsAge with const so the reduce example actually works in strict mode (was an implicit-global).

Repository hygiene

  • README.md — removed dead Greenkeeper badge; added a grouped Table of Contents linking to every lesson (Intro / Getting started / Components & data / Ecosystem); rewrote the Pre-requisites paragraph as a clear bulleted list of the JS knowledge expected before starting.
  • 00_1_intro_JS.md — appended two new sections (Primitive and reference types; Coercion) inlined from the standalone notesToPlace files.
  • Deleted notesToPlace.md and notesToPlace_primitive-and-reference-types.md (content moved into 00_1_intro_JS.md).
  • Deleted .whitesource and greenkeeper.json — Greenkeeper shut down in 2020, and greenkeeper.json referenced example folders that no longer exist.
  • .gitignore/node_modulesnode_modules/ so it applies recursively to every example sub-project; collapsed the .env.local / .env.development.local list to a single .env.* glob with !.env.example allow-list; added dist/ to the build output rule.
  • LICENSE — updated Copyright (c) 2018 React to 2018-2026 Al Diaz.

Test plan

  • Skim each modified lesson and confirm the corrected wording reads naturally.
  • Spot-check the rewritten code snippets — 00_3_intro_es2015.md reduce, 01_1_elements.md HelloWorld, 02_0_components.md HOC, 02_1_props.md Child + sort, 08_redux.md addToTotal / functional App, 09_packages.md Axios action creator, 11_webpack.md splitChunks / express-static-gzip / image import — paste into a sandbox and confirm they parse and run.
  • 06_lifecycle-events.md — verify the three-phase listing (Mounting / Updating / Unmounting) matches React class-component docs.
  • Verify the README TOC links resolve to the right lessons in the GitHub UI.
  • Confirm the new .gitignore excludes node_modules/ everywhere by running git status after a fresh npm install inside one of the examples/ folders.

Summary by CodeRabbit

  • Documentation

    • Wide proofreading, wording and example improvements across tutorials (intro, JS, components, state, props, lifecycle, forms, routing, Redux, webpack, testing); reorganized README and clarified prerequisites; some ancillary notes removed for concision.
  • Chores

    • Updated ignore patterns, removed obsolete configuration entries, and refreshed license copyright.

Lessons (00_*–12_*):

- Grammar pass across all lessons: Spanish-calque "if not, ..." rewritten
  to "but rather, ...", "in deep" → "in depth", "Programing" → "Programming",
  "cristal" → "crystal", "componenDidMount" → "componentDidMount",
  "patten" → "pattern", "thorugh" → "through", "advice" → "advise",
  "you/your", "an example/an particularly", "ouput/outpout" → "output",
  "remember you" → "remind you", "What is Destructure" → "Destructuring",
  "Name export" → "Named export", and many similar typo/copy-edit fixes.

- 06_lifecycle-events.md: replaced the conflated single "Order of execution"
  list with three phases — Mounting, Updating, Unmounting. Removed
  componentWillUnmount from the deprecated list (it is not deprecated) and
  renamed the deprecated entries to their UNSAFE_* form.

- 02_0_components.md: replaced the "functional components perform better"
  claim with the real reasons to prefer them (hooks API, no this-binding,
  less boilerplate, easier composition). Switched the naming guidance to
  PascalCase / camelCase. Closed unclosed JSX tags in the Composition
  example. Added missing `import React from 'react'` to the HOC example.

- 02_1_props.md: copy state before sorting (`[...this.state.users].sort(...)`)
  to avoid mutating it; wrapped the `<li>` map output in a `<ul>`; added a
  modern-React note about preferring componentDidUpdate / useEffect over
  the setState callback.

- 03_local-state.md: clarified setState shallow merge with a nested-object
  example; rewrote the bind(null, ...) explanation to cover strict-mode
  this and the lexically-bound class field arrow function.

- 01_1_elements.md: corrected createElement signature to variadic children;
  rewrote "object representation of a DOM node" to cover components too;
  declared HelloWorld with const.

- 05_controlled-components.md: clarified that the form-fields-in-URL
  behavior only happens with method="GET"; POST puts them in the body.

- 08_redux.md: distinguished currying from partial application; fixed the
  count of nested functions in the example note; added `compose` to the
  `redux` import where the snippet referenced it; addToTotal now uses its
  `amount` argument (was hardcoded to 10); functional App now returns its
  JSX (was a no-return statement body); added a note clarifying that the
  duplication-on-dispatch is intentional for the demo, not how a real
  reducer should be written; moved .env guidance to the project root and
  recommended excluding it from git.

- 09_packages.md: rewrote the contradictory PropTypes "we should not /
  we can choose" sentence; added the missing `import axios from 'axios'`;
  fixed the bogus `type: FETCH_WEATHER` to FETCH_COMMENTS; added a heads-up
  that redux-promise is archived and pointing to redux-thunk / Redux Toolkit.

- 11_webpack.md: added missing comma in splitChunks cacheGroups vendor;
  prefere → orderPreference (real express-static-gzip option name);
  fixed `srcimages/` and `'.images/...'` to `src/images/` and './images/';
  '@babel/react' → '@babel/preset-react' for consistency with .babelrc;
  dropped the unused `App` from the './app' import; promoted "##From..."
  to a real heading; misc typos (webpackHotMiddleware, npm start,
  Standardization, configuration, within, etc.).

- 00_3_intro_es2015.md: declared addFriendsAge with const so the reduce
  example actually works in strict mode (was an implicit-global).

Repository hygiene:

- README.md: removed dead Greenkeeper badge; added a grouped Table of
  Contents linking to every lesson (Intro / Getting started / Components
  & data / Ecosystem); rewrote the Pre-requisites paragraph as a clear
  bulleted list of the JS knowledge expected before starting.

- 00_1_intro_JS.md: appended two new sections (Primitive and reference
  types; Coercion) inlined from the standalone notesToPlace files.

- Deleted notesToPlace.md and notesToPlace_primitive-and-reference-types.md
  (content moved into 00_1_intro_JS.md).

- Deleted .whitesource and greenkeeper.json: Greenkeeper shut down in 2020,
  and greenkeeper.json referenced example folders that no longer exist.

- .gitignore: changed `/node_modules` to `node_modules/` so it applies
  recursively to every example sub-project; collapsed the .env.local /
  .env.development.local list to a single `.env.*` glob with
  `!.env.example` allow-list; added `dist/` to the build output rule.

- LICENSE: updated `Copyright (c) 2018  React` to `2018-2026 Al Diaz`.
@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a5fc8004-ef73-4de7-ab43-4e81d2fcc1aa

📥 Commits

Reviewing files that changed from the base of the PR and between 04f6535 and 98a9bc4.

📒 Files selected for processing (1)
  • 11_webpack.md

📝 Walkthrough

Walkthrough

This pull request updates repository configuration (.gitignore, .whitesource, greenkeeper.json, LICENSE), restructures README, and applies wide documentation proofreading and example corrections across JavaScript and React tutorial files, Redux and webpack snippets, testing docs, and consolidates/removes standalone note files.

Changes

Documentation & Configuration Update

Layer / File(s) Summary
Configuration & Project Setup
.gitignore, .whitesource, LICENSE, greenkeeper.json
Modernized .gitignore patterns (e.g., node_modules/, .env.* with .env.example exception, dist/, coverage/); removed .whitesource scanning config; updated LICENSE copyright line; removed greenkeeper.json.
README & Getting Started
README.md
Reworked Table of Contents and Getting Started; added explicit Pre-requisites listing ES6+ topics and guidance to complete Intro chapters if unfamiliar.
JavaScript Fundamentals
00_0_intro.md, 00_1_intro_JS.md, 00_2_intro_JS-patterns.md, 00_3_intro_es2015.md
Clarified Global Execution Context/Call Stack and scope; added or consolidated primitive vs reference and coercion material; corrected HOF/currying wording; fixed .reduce() example and assorted wording/punctuation.
React Elements & Module Systems
01_0_starting.md, 01_1_elements.md, 01_2_JS-module-systems.md
Documented React.createElement() signature (type/props/children); emphasized element immutability/reconciliation role; clarified module-systems pipeline and export examples.
React Components
02_0_components.md
Clarified naming conventions (PascalCase for components, camelCase for DOM), recommended functional components by default, emphasized single-root JSX, expanded HOC explanation, and adjusted composition example structure.
Props, State & Lifecycle
02_1_props.md, 03_local-state.md, 06_lifecycle-events.md
Reframed key guidance as stable reconciliation identifier; wrapped mapped list items in ul; warned against in-place array mutation and used spread-copy in examples; documented setState shallow-merge behavior and nested-update spreading; reorganized lifecycle into Mounting/Updating/Unmounting and mapped deprecated lifecycles to UNSAFE_*.
Controlled Components & Conditional Rendering
05_controlled-components.md, 07_conditional-rendering.md
Refined React DevTools and debounce instructions; documented form default GET/query-string behavior; fixed "cristal clear"→"crystal clear" across conditional-rendering examples.
Redux & State Management
08_redux.md
Clarified createStore composition and enhancer/middleware arguments; added compose/DevTools guidance; recommended project-root .env with NODE_PATH=src/ and .env.example/.gitignore notes; clarified Provider/connect behavior and currying; condensed functional App example and added TODOs for ownProps/mapDispatchToProps; emphasized normalized state.
Packages & Ecosystem
09_packages.md
Noted PropTypes is dev-only by default with production import alternative; corrected React Router route/link explanations; fixed Axios action-creator import and FETCH_COMMENTS type; marked redux-promise archived and recommended redux-thunk/Redux Toolkit.
Build Tools & Testing
11_webpack.md, 10_unit-tests.md
Fixed webpack examples and config text (Babel preset to @babel/preset-react, hot-middleware wiring, image paths to src/images, brotli orderPreference: ['br'], SSR/dev workflow, build:server:flex script); unit-tests docs punctuation and beforeEach/afterEach clarifications.
Content Consolidation & Small Fixes
12_full-client-app.md, notesToPlace.md, notesToPlace_primitive-and-reference-types.md
Minor typo fixes (e.g., "you" → "your"); removed separate notes files after integrating coercion and primitive/reference content into main intro docs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A rabbit hops through docs with care,
Fixing typos here and there,
Redux flows and lifecycle dance,
Props and state in perfect trance—
Knowledge shared, now crystal clear! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title comprehensively and accurately describes the main changes across the pull request: grammar fixes, factual accuracy corrections, code bug fixes, and repository hygiene improvements. It clearly summarizes the scope of this cleanup effort.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lessons-and-repo-cleanup

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🧹 Nitpick comments (1)
09_packages.md (1)

6-6: 💤 Low value

Minor grammar improvement.

The phrase "works just in development" is slightly awkward. Consider "works only in development" or "is active only in development" for clearer phrasing.

✏️ Suggested wording improvement
-This dependency works just in `development`.
+This dependency is active only in `development`.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@09_packages.md` at line 6, Update the sentence "This dependency works just in
`development`" to clearer wording such as "This dependency works only in
`development`" or "This dependency is active only in `development`" so the
intent is grammatically unambiguous; replace the existing phrase in the same
line accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@00_0_intro.md`:
- Line 5: Update the time reference in the sentence that currently reads "More
than 5 years have passed since React´s official release (*Facebook - March
2013*);" to a date-stable phrasing such as "over a decade since React's official
release (March 2013)" or "since March 2013" so the statement remains accurate;
edit the sentence text in 00_0_intro.md (the line containing that exact
sentence) to replace "More than 5 years" with your chosen stable phrase and
ensure punctuation/formatting around "React's official release (March 2013)" is
consistent.
- Line 5: Replace the non-standard acute accent character (´) used in
contractions with the standard ASCII apostrophe (') in the text snippets such as
"More than 5 years have passed since React´s official release" and other
occurrences like "It's" so they read "React's" and "It's"; search for the
visible incorrect characters (´) in the document and normalize them to the
proper apostrophe throughout.

In `@02_0_components.md`:
- Line 9: Update the wording that currently says "use camelCase for DOM
elements" to instruct using lowercase tags for intrinsic JSX elements (e.g.,
`<div>`, `<section>`), while keeping camelCase guidance for HOC/HOF and methods
like `ListOfRecords`/function names; ensure the example line (`<ListOfRecords
/>`) remains as a component example and clarify that intrinsic DOM tags should
be lowercase.

In `@03_local-state.md`:
- Line 218: Update the explanation about .bind: change the statement that in
strict mode `this` becomes `undefined` to say it becomes `null` when using
`.bind(null)` on a regular function, while keeping the existing arrow-function
caveat for deleteFriend (the class field arrow function) intact; ensure the text
references that the "new function" returned by `.bind()` has its `this` set to
the first argument (`null` here) and that in this example bind is really used to
pre-fill the first argument ('Wendy').

In `@05_controlled-components.md`:
- Line 179: The note uses an inconsistent state reference: change the example
text that says value={yourName} to use the same form as the rest of the examples
(this.state.yourName) or explicitly mention destructuring if you prefer
value={yourName} after const { yourName } = this.state; — update the phrase in
the Debounce note to reference this.state.yourName (or add a short clause about
destructuring) so it matches the surrounding examples and avoids confusion.
- Line 31: The markdown currently shows the component name as raw HTML; wrap the
component token <App /> in inline code backticks (i.e., render it as `<App />`)
so Markdown treats it as code text rather than an HTML element—update the text
that references the App component accordingly.
- Line 68: Replace the incorrect acute-accent character (´, U+00B4) with a
standard ASCII apostrophe (', U+0027) for the occurrences of the words "user´s",
"there´s", and "Community´s" in the document (search for those exact tokens and
replace to "user's", "there's", "Community's"); also scan the rest of the file
for any other instances of U+00B4 and replace them with the ASCII apostrophe to
ensure consistent typography.

In `@06_lifecycle-events.md`:
- Around line 14-18: Update the "Updating" section to clarify that forceUpdate()
is an update trigger but it bypasses shouldComponentUpdate(nextProps,
nextState): keep the listed sequence (getDerivedStateFromProps →
shouldComponentUpdate → render) but add a short parenthetical or sentence after
shouldComponentUpdate stating that when forceUpdate() is used on a class
component, React skips shouldComponentUpdate and proceeds to render(), and
reference the methods by name (forceUpdate, shouldComponentUpdate,
getDerivedStateFromProps, render) so readers can locate the behavior quickly.

In `@10_unit-tests.md`:
- Line 261: The docs show malformed examples for the test hooks; update the
snippet so both beforeEach and afterEach are complete, syntactically correct
callbacks by changing the text to include the full expressions beforeEach(() =>
{}) and afterEach(() => {}); locate the instances referencing
beforeEach/afterEach (the doc line with "beforeEach(() => {} and afterEach(() =>
{}") and replace them with the balanced forms so readers see beforeEach(() =>
{}) and afterEach(() => {}).

---

Nitpick comments:
In `@09_packages.md`:
- Line 6: Update the sentence "This dependency works just in `development`" to
clearer wording such as "This dependency works only in `development`" or "This
dependency is active only in `development`" so the intent is grammatically
unambiguous; replace the existing phrase in the same line accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1c5edffe-c3c7-4616-a438-5cd9ecf3f5fe

📥 Commits

Reviewing files that changed from the base of the PR and between e376fc9 and ad4b620.

📒 Files selected for processing (25)
  • .gitignore
  • .whitesource
  • 00_0_intro.md
  • 00_1_intro_JS.md
  • 00_2_intro_JS-patterns.md
  • 00_3_intro_es2015.md
  • 01_0_starting.md
  • 01_1_elements.md
  • 01_2_JS-module-systems.md
  • 02_0_components.md
  • 02_1_props.md
  • 03_local-state.md
  • 05_controlled-components.md
  • 06_lifecycle-events.md
  • 07_conditional-rendering.md
  • 08_redux.md
  • 09_packages.md
  • 10_unit-tests.md
  • 11_webpack.md
  • 12_full-client-app.md
  • LICENSE
  • README.md
  • greenkeeper.json
  • notesToPlace.md
  • notesToPlace_primitive-and-reference-types.md
💤 Files with no reviewable changes (4)
  • notesToPlace.md
  • .whitesource
  • greenkeeper.json
  • notesToPlace_primitive-and-reference-types.md

Comment thread 00_0_intro.md Outdated
Comment thread 02_0_components.md Outdated
Comment thread 03_local-state.md Outdated
Comment thread 05_controlled-components.md Outdated
Comment thread 05_controlled-components.md Outdated
Comment thread 05_controlled-components.md Outdated
Comment thread 06_lifecycle-events.md
Comment thread 10_unit-tests.md Outdated
- 03_local-state.md: correct `.bind(null)` strict-mode claim — `this` is
  `null`, not `undefined` (only implicit `this` is coerced; explicit bind
  passes the value through verbatim).
- 06_lifecycle-events.md: note that `forceUpdate()` bypasses
  `shouldComponentUpdate()` in the Updating phase.
- 02_0_components.md: clarify intrinsic JSX tags are lowercase (`<div>`,
  `<section>`); camelCase applies to handlers / methods / prop names,
  not DOM tag names.
- 10_unit-tests.md: balance the `beforeEach(() => {})` and
  `afterEach(() => {})` parens in the example note.
- 00_0_intro.md: replace stale "More than 5 years" with date-stable
  "Since React's official release (March 2013), …".
- 05_controlled-components.md: wrap `<App />` reference in backticks;
  align Debounce note state reference with surrounding examples
  (this.state.yourName).
- 09_packages.md: "works just in development" → "works only in development".
- All lessons + README: typography pass replacing the acute accent
  (´, U+00B4) with a standard ASCII apostrophe (') in every
  contraction/possessive (`React´s` → `React's`, `It´s` → `It's`,
  `don´t` → `don't`, etc.). Verified zero U+00B4 remain.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
11_webpack.md (1)

2082-2090: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

vendor cache group needs a test property to explicitly target node_modules.

Without a test matcher, minChunks: 2 will capture any module shared across chunks—including app code—rather than specifically vendor libraries. Webpack's official documentation recommends using test: /[\\/]node_modules[\\/]/ to isolate third-party dependencies.

Suggested adjustment
 cacheGroups: {
   vendor: {
+    test: /[\\/]node_modules[\\/]/,
+    name: 'vendors',
     filename: '[name].bundle.js',
     chunks: 'initial',
-    minChunks: 2
+    minChunks: 1
   }
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@11_webpack.md` around lines 2082 - 2090, The vendor cacheGroup in
optimization.splitChunks currently lacks a test matcher and so minChunks: 2 can
pull shared app modules; update the vendor cacheGroup (named "vendor" inside
optimization.splitChunks.cacheGroups) to add an explicit test property that
matches node_modules (e.g., the standard /[\\/]node_modules[\\/]/ regex) so only
third‑party dependencies are targeted while keeping filename, chunks and
minChunks as-is.
🧹 Nitpick comments (2)
11_webpack.md (1)

99-113: ⚡ Quick win

Convert app.js to ESM export to match the ESM import on line 99.

The snippet on line 99 uses ESM named import (import { someFunction } from './app') while the accompanying app.js snippet exports via CommonJS (module.exports.someFunction). Per webpack documentation, named exports cannot be imported from CommonJS modules—only the default export is available. This mixed style will fail or behave unexpectedly depending on webpack configuration and toolchain.

Suggested doc fix
 import { someFunction } from './app';

 // app.js
 console.log('app.js');
-module.exports.someFunction = () => {
+export const someFunction = () => {
   console.log('app.js > someFunction');
 };
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@11_webpack.md` around lines 99 - 113, The import in index.js uses a named ESM
import (import { someFunction } from './app') but app.js currently uses CommonJS
(module.exports.someFunction); change app.js to use a named ESM export that
matches the import (e.g., export function someFunction(...) or export const
someFunction = ...) so the symbol someFunction is a proper named export for ESM
consumers and the import { someFunction } from './app' will resolve correctly.
README.md (1)

53-53: ⚡ Quick win

Shorten "during the course of" for clarity.

The phrase "during the course of" is unnecessarily wordy. Consider replacing it with "throughout" or "during" for better readability.

✂️ Proposed simplification
-This is a pure practical guide (*ps*, it was at the beginning): please, keep the `practical intention` present during the course of these "shared notes"; I don't have the intent of challenging the great and plentiful coaching classes, nor the books/"white papers" that today, you can easily find anywhere (starting with Facebook's own proprietary documentation).
+This is a pure practical guide (*ps*, it was at the beginning): please, keep the `practical intention` present throughout these "shared notes"; I don't have the intent of challenging the great and plentiful coaching classes, nor the books/"white papers" that today, you can easily find anywhere (starting with Facebook's own proprietary documentation).

As per coding guidelines, static analysis identified this as potentially wordy (EN_WORDINESS_PREMIUM_DURING_THE_COURSE_OF).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 53, Replace the wordy phrase "during the course of" in the
sentence that reads "please, keep the `practical intention` present during the
course of these "shared notes"" with a concise alternative such as "during" or
"throughout" so the line becomes "...keep the `practical intention` present
during these 'shared notes'" (or "...throughout these 'shared notes'"),
preserving punctuation and emphasis formatting.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@11_webpack.md`:
- Line 2420: The markdown fenced code block at the shown closing fence (the
triple backticks ``` without a language) is missing a language tag; update the
opening fence for that block to include an appropriate language identifier
(e.g., ```json or ```bash) so the block conforms to markdownlint MD040 and
enables proper syntax highlighting.
- Line 1002: The walkthrough incorrectly references "src/package.json"; update
any occurrences that instruct moving Jest config from "src/package.json" to
"config/jest/jest.config.json" so they instead reference the repository root
"package.json" (i.e., change "src/package.json" → "package.json") and ensure the
step clearly states moving the Jest config into "config/jest/jest.config.json".

---

Outside diff comments:
In `@11_webpack.md`:
- Around line 2082-2090: The vendor cacheGroup in optimization.splitChunks
currently lacks a test matcher and so minChunks: 2 can pull shared app modules;
update the vendor cacheGroup (named "vendor" inside
optimization.splitChunks.cacheGroups) to add an explicit test property that
matches node_modules (e.g., the standard /[\\/]node_modules[\\/]/ regex) so only
third‑party dependencies are targeted while keeping filename, chunks and
minChunks as-is.

---

Nitpick comments:
In `@11_webpack.md`:
- Around line 99-113: The import in index.js uses a named ESM import (import {
someFunction } from './app') but app.js currently uses CommonJS
(module.exports.someFunction); change app.js to use a named ESM export that
matches the import (e.g., export function someFunction(...) or export const
someFunction = ...) so the symbol someFunction is a proper named export for ESM
consumers and the import { someFunction } from './app' will resolve correctly.

In `@README.md`:
- Line 53: Replace the wordy phrase "during the course of" in the sentence that
reads "please, keep the `practical intention` present during the course of these
"shared notes"" with a concise alternative such as "during" or "throughout" so
the line becomes "...keep the `practical intention` present during these 'shared
notes'" (or "...throughout these 'shared notes'"), preserving punctuation and
emphasis formatting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 94a40d80-b224-4064-8812-5e6ad7d5f773

📥 Commits

Reviewing files that changed from the base of the PR and between ad4b620 and 4c45fe0.

📒 Files selected for processing (19)
  • 00_0_intro.md
  • 00_1_intro_JS.md
  • 00_3_intro_es2015.md
  • 01_0_starting.md
  • 01_1_elements.md
  • 01_2_JS-module-systems.md
  • 02_0_components.md
  • 02_1_props.md
  • 03_local-state.md
  • 04_methods.md
  • 05_controlled-components.md
  • 06_lifecycle-events.md
  • 07_conditional-rendering.md
  • 08_redux.md
  • 09_packages.md
  • 10_unit-tests.md
  • 11_webpack.md
  • 12_full-client-app.md
  • README.md
✅ Files skipped from review due to trivial changes (6)
  • 04_methods.md
  • 07_conditional-rendering.md
  • 12_full-client-app.md
  • 01_1_elements.md
  • 00_3_intro_es2015.md
  • 06_lifecycle-events.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • 01_0_starting.md
  • 01_2_JS-module-systems.md
  • 05_controlled-components.md

Comment thread 11_webpack.md Outdated
Comment thread 11_webpack.md Outdated
- 11_webpack.md: fix two stale `src/package.json` references — both
  steps actually mean the project-root `package.json` (CRA stores
  package.json at the root, not under `src/`).
- 11_webpack.md: add a `test: /[\\/]node_modules[\\/]/` matcher to the
  `vendor` cacheGroup, plus a `name`. Without `test`, `minChunks: 2`
  would also capture app modules shared between chunks. Lowered
  `minChunks` to 1 (canonical webpack guidance for vendor isolation)
  and added a one-line note explaining the matcher.
- 11_webpack.md: convert `app.js` from `module.exports.someFunction`
  to `export const someFunction = …` so it matches the ESM named
  import in `index.js` (`import { someFunction } from './app'`); a
  named CommonJS export is not reliably importable as a named ESM
  symbol.
- 11_webpack.md: tag the previously bare ```` ``` ```` fence around
  the `build:server:flex` script with `json` (markdownlint MD040).
- README.md: "during the course of these shared notes" → "throughout
  these shared notes" (drop wordy phrasing).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
11_webpack.md (1)

2494-2496: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add explicit script argument to nodemon dev command.

The nodemon command in this dev script is missing the server script to execute. Without it, nodemon will attempt to find a default from the package.json main property or scripts.start field. According to nodemon documentation, when using --watch options, the script should be explicitly specified and placed after the watch options.

Suggested patch
-"dev":"cross-env NODE_ENV=development nodemon --watch config --watch server",
+"dev":"cross-env NODE_ENV=development nodemon --watch config --watch server server/index.js",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@11_webpack.md` around lines 2494 - 2496, The "dev" npm script currently runs
`cross-env NODE_ENV=development nodemon --watch config --watch server` without
specifying the server entrypoint; update the "dev" script (the package.json
"dev" key) to include the explicit server script argument (for example your
server entry file like server/index.js or server.js) placed after the `--watch`
options so nodemon runs that file (keep the `cross-env NODE_ENV=development` and
the `--watch config --watch server` flags and add the entrypoint after them).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@11_webpack.md`:
- Around line 1150-1154: The dev script in package.json currently points to
"src/server/index.js" which will cause a module-not-found error; update the
"dev" script value to use the documented server entrypoint "server/index.js"
(i.e., change the package.json "dev" script from node src/server/index.js to
node server/index.js) so the project starts with the same entry used throughout
the walkthrough.
- Around line 2424-2426: Update the npm script named "build:server:flex" to run
the server bundle with NODE_ENV set to production using cross-env; specifically,
modify the script invocation so cross-env sets NODE_ENV=production before
launching nodemon (keep the existing nodemon, --watch build and
build/server-prod-bundle.js arguments and the script name "build:server:flex"
unchanged) to ensure runtime branches reading process.env.NODE_ENV behave like
production.

---

Outside diff comments:
In `@11_webpack.md`:
- Around line 2494-2496: The "dev" npm script currently runs `cross-env
NODE_ENV=development nodemon --watch config --watch server` without specifying
the server entrypoint; update the "dev" script (the package.json "dev" key) to
include the explicit server script argument (for example your server entry file
like server/index.js or server.js) placed after the `--watch` options so nodemon
runs that file (keep the `cross-env NODE_ENV=development` and the `--watch
config --watch server` flags and add the entrypoint after them).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cca396fe-66f0-4e33-8f03-4fce4873a39c

📥 Commits

Reviewing files that changed from the base of the PR and between 4c45fe0 and 04f6535.

📒 Files selected for processing (2)
  • 11_webpack.md
  • README.md
✅ Files skipped from review due to trivial changes (1)
  • README.md

Comment thread 11_webpack.md
Comment thread 11_webpack.md
All three findings are in 11_webpack.md npm script snippets:

- Line 1153 — `"dev": "node src/server/index.js"` → `"dev": "node server/index.js"`.
  The walkthrough creates `server/` at the project root (not under `src/`),
  so the original path would module-not-found. Last round I corrected the
  surrounding prose ("project-root package.json") but left the script body
  stale; this finishes the fix.
- Line 2425 — `build:server:flex` is run against the production server
  bundle, so it needs `NODE_ENV=production`. Added `cross-env
  NODE_ENV=production` to the existing nodemon invocation. Server logic
  branching on `process.env.NODE_ENV` would otherwise see `undefined`.
- Line 2495 — `"dev": "cross-env NODE_ENV=development nodemon --watch config --watch server"`
  is missing the entrypoint after the watch options; nodemon would fall
  back to package.json `main`. Added `server/index.js` after the watches
  so it runs the same entry used elsewhere in the chapter.
@alpersonalwebsite
alpersonalwebsite merged commit 7d0aeae into master May 9, 2026
2 checks passed
@alpersonalwebsite
alpersonalwebsite deleted the lessons-and-repo-cleanup branch May 11, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant