Answers.Body: <p>I suggest learning through projects and documentation rather than books in this case. React has very good documentation and there are hundreds of thousands of React questions and answers on Stack Overflow you can consult if you get stuck as you work on projects. There are few technologies with as abundant support as React.</p>
  <p>Books are wonderful, but React evolves quickly and books don't. I prefer books for topics that change slowly, like algorithms, computer organization and software engineering principles. Books tend to offer deep, conceptual dives, but what ultimately made React comprehensible for me was playing with code in a hands-on manner and consulting resources on an as-needed basis. The hardest parts of learning React are the many weird gotchas and counterintuitive rules, which aren't easily grasped except by facing them head-on as you code.</p>
  <p>Here's a general outline you could follow:</p>
  <ol>
  <li><p>Work through the official <a href="https://react.dev/learn/tutorial-tic-tac-toe" rel="nofollow noreferrer">React tutorial</a>. You'll build tic tac toe, which will teach you most of the basic React concepts: JSX, rendering, props, state, event handling, lists and keys. It'll also ensure you're up to speed on JS basics like arrow functions, mapping over arrays, etc.</p>
  <p>This tutorial has been updated to use functional components and hooks. Bear in mind that this newer approach was preceded by class components, which you may see from time to time when looking for help on Stack Overflow and in older books.</p>
  </li>
  <li><p>Read through the <a href="https://react.dev/learn" rel="nofollow noreferrer">getting started</a> sections of the official docs.</p>
  </li>
  <li><p>Make a few simple projects from scratch on your own. The idea here is to run into problems and debug them by searching Stack Overflow and the React docs. Suggested toy projects:</p>
  <ul>
  <li>Click counter (click a button to increase a counter value--the &quot;hello world&quot; of React; teaches basic state and event handling)</li>
  <li>Celsius to Fahrenheit converter, or anything with a form input or two.</li>
  <li><a href="https://en.wikipedia.org/wiki/Rock_paper_scissors" rel="nofollow noreferrer">Rock, Paper, Scissors</a></li>
  <li>A to-do list with child components and an array of objects in the parent component. If you're feeling ambitious, add local storage via a <a href="https://react.dev/learn/reusing-logic-with-custom-hooks" rel="nofollow noreferrer">custom hook</a>.</li>
  <li>A calculator</li>
  <li>A music player (a list of buttons that play/pause audio on click)</li>
  </ul>
  </li>
  <li><p>Now you're ready for the <a href="https://react.dev/reference/react/useEffect" rel="nofollow noreferrer"><code>useEffect</code></a> hook, which is tricky to learn but essential. Make a project that uses <code>fetch</code> to call a REST API. You can use <a href="https://jsonplaceholder.com/" rel="nofollow noreferrer">https://jsonplaceholder.com/</a> or another API you like. You should be able to fetch a list of comments or posts and display that list, both when a component loads and on a button click. Consider also coding a clock or pomodoro timer app, keeping in mind these can be difficult.</p>
  </li>
  <li><p>Add the React Router package and create a multi-page application of your choosing.</p>
  </li>
  </ol>
  <p>With these basics under your belt, you should be equipped to create a larger project and explore the React ecosystem under your own steam.</p>
  <p>Here are a few other things you may want to explore once you've mastered the basics and made a few apps on your own:</p>
  <ul>
  <li>Advanced concepts from the React docs like <a href="https://react.dev/reference/react/useContext" rel="nofollow noreferrer">context</a> and <a href="https://react.dev/reference/react/useRef" rel="nofollow noreferrer">refs</a></li>
  <li>Deeper backend integration (if you're not a backend engineer, you can mock <code>fetch</code> and keep a fake database in local storage for starters, although this hits limits like authentication quickly)</li>
  <li>Unit testing with Jest and React Testing Library</li>
  <li>Integration testing with Playwright, Puppeteer or Cucumber</li>
  <li>UI frameworks like Material, Semantic, Tailwind or Bootstrap</li>
  <li>Styled components</li>
  <li>Redux</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-12T08:27:30.803Z
Answers.LastActivityDate: 2023-03-17T14:28:43.713Z
Answers.LastEditDate: 2023-03-17T14:28:43.713Z
Answers.UserDisplayName: ggorlen
Body: <p>My background:
  I have completed courses in HTML, CSS, Bootstrap and JavaScript and I can read and write code in these languages.</p>
  <p>I want to learn React and I want to build frontends of websites.</p>
  <p>What's the best way to learn React for my case? Which books, courses and tutorials are recommendend? Which projects are recommended?</p>
  
Tags: <self-learning><javascript>
Title: How to learn React JS?
ThreadText: # How to learn React JS?
  
  (Asked by: username_0 on 2023-01-02)
  
  My background:
  I have completed courses in HTML, CSS, Bootstrap and JavaScript and I can read and write code in these languages.
  
  I want to learn React and I want to build frontends of websites.
  
  What's the best way to learn React for my case? Which books, courses and tutorials are recommendend? Which projects are recommended?
  
  **Tags:** self-learning, javascript
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-01-12. Score: 3 | Accepted answer
  
  I suggest learning through projects and documentation rather than books in this case. React has very good documentation and there are hundreds of thousands of React questions and answers on Stack Overflow you can consult if you get stuck as you work on projects. There are few technologies with as abundant support as React.
  
  Books are wonderful, but React evolves quickly and books don't. I prefer books for topics that change slowly, like algorithms, computer organization and software engineering principles. Books tend to offer deep, conceptual dives, but what ultimately made React comprehensible for me was playing with code in a hands-on manner and consulting resources on an as-needed basis. The hardest parts of learning React are the many weird gotchas and counterintuitive rules, which aren't easily grasped except by facing them head-on as you code.
  
  Here's a general outline you could follow:
  
  1. Work through the official [React tutorial](https://react.dev/learn/tutorial-tic-tac-toe). You'll build tic tac toe, which will teach you most of the basic React concepts: JSX, rendering, props, state, event handling, lists and keys. It'll also ensure you're up to speed on JS basics like arrow functions, mapping over arrays, etc.
  
     This tutorial has been updated to use functional components and hooks. Bear in mind that this newer approach was preceded by class components, which you may see from time to time when looking for help on Stack Overflow and in older books.
  2. Read through the [getting started](https://react.dev/learn) sections of the official docs.
  3. Make a few simple projects from scratch on your own. The idea here is to run into problems and debug them by searching Stack Overflow and the React docs. Suggested toy projects:
  
     * Click counter (click a button to increase a counter value--the "hello world" of React; teaches basic state and event handling)
     * Celsius to Fahrenheit converter, or anything with a form input or two.
     * [Rock, Paper, Scissors](https://en.wikipedia.org/wiki/Rock_paper_scissors)
     * A to-do list with child components and an array of objects in the parent component. If you're feeling ambitious, add local storage via a [custom hook](https://react.dev/learn/reusing-logic-with-custom-hooks).
     * A calculator
     * A music player (a list of buttons that play/pause audio on click)
  4. Now you're ready for the [`useEffect`](https://react.dev/reference/react/useEffect) hook, which is tricky to learn but essential. Make a project that uses `fetch` to call a REST API. You can use <https://jsonplaceholder.com/> or another API you like. You should be able to fetch a list of comments or posts and display that list, both when a component loads and on a button click. Consider also coding a clock or pomodoro timer app, keeping in mind these can be difficult.
  5. Add the React Router package and create a multi-page application of your choosing.
  
  With these basics under your belt, you should be equipped to create a larger project and explore the React ecosystem under your own steam.
  
  Here are a few other things you may want to explore once you've mastered the basics and made a few apps on your own:
  
  * Advanced concepts from the React docs like [context](https://react.dev/reference/react/useContext) and [refs](https://react.dev/reference/react/useRef)
  * Deeper backend integration (if you're not a backend engineer, you can mock `fetch` and keep a fake database in local storage for starters, although this hits limits like authentication quickly)
  * Unit testing with Jest and React Testing Library
  * Integration testing with Playwright, Puppeteer or Cucumber
  * UI frameworks like Material, Semantic, Tailwind or Bootstrap
  * Styled components
  * Redux
  
  
  ---
  
  