Skip to content

Commit a0efd00

Browse files
authored
Merge pull request #2795 from romanstetsyk/part1d-links
part1d. Update links to react docs
2 parents 723ee2a + bc4d638 commit a0efd00

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/content/1/en/part1d.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ The application appears to work. However, <i>it is forbidden in React to mutate
160160

161161
Storing all of the state in a single state object is a bad choice for this particular application; there's no apparent benefit and the resulting application is a lot more complex. In this case, storing the click counters into separate pieces of state is a far more suitable choice.
162162

163-
There are situations where it can be beneficial to store a piece of application state in a more complex data structure. [The official React documentation](https://reactjs.org/docs/hooks-faq.html#should-i-use-one-or-many-state-variables) contains some helpful guidance on the topic.
163+
There are situations where it can be beneficial to store a piece of application state in a more complex data structure. [The official React documentation](https://react.dev/learn/choosing-the-state-structure) contains some helpful guidance on the topic.
164164

165165
### Handling arrays
166166

@@ -317,7 +317,7 @@ Even though a new value was set for _left_ by calling _setLeft(left + 1)_, the o
317317
setTotal(left + right)
318318
```
319319

320-
The reason for this is that a state update in React happens [asynchronously](https://reactjs.org/docs/state-and-lifecycle.html#state-updates-may-be-asynchronous), i.e. not immediately but "at some point" before the component is rendered again.
320+
The reason for this is that a state update in React happens [asynchronously](https://react.dev/learn/queueing-a-series-of-state-updates), i.e. not immediately but "at some point" before the component is rendered again.
321321

322322
We can fix the app as follows:
323323

@@ -391,7 +391,7 @@ And in all other cases, the component renders the clicking history:
391391

392392
The <i>History</i> component renders completely different React elements depending on the state of the application. This is called <i>conditional rendering</i>.
393393

394-
React also offers many other ways of doing [conditional rendering](https://reactjs.org/docs/conditional-rendering.html). We will take a closer look at this in [part 2](/en/part2).
394+
React also offers many other ways of doing [conditional rendering](https://react.dev/learn/conditional-rendering). We will take a closer look at this in [part 2](/en/part2).
395395

396396
Let's make one last modification to our application by refactoring it to use the _Button_ component that we defined earlier on:
397397

@@ -451,7 +451,7 @@ const App = () => {
451451

452452
### Old React
453453

454-
In this course, we use the [state hook](https://reactjs.org/docs/hooks-state.html) to add state to our React components, which is part of the newer versions of React and is available from version [16.8.0](https://www.npmjs.com/package/react/v/16.8.0) onwards. Before the addition of hooks, there was no way to add state to functional components. Components that required state had to be defined as [class](https://reactjs.org/docs/react-component.html) components, using the JavaScript class syntax.
454+
In this course, we use the [state hook](https://react.dev/learn/state-a-components-memory) to add state to our React components, which is part of the newer versions of React and is available from version [16.8.0](https://www.npmjs.com/package/react/v/16.8.0) onwards. Before the addition of hooks, there was no way to add state to functional components. Components that required state had to be defined as [class](https://react.dev/reference/react/Component) components, using the JavaScript class syntax.
455455

456456
In this course, we have made the slightly radical decision to use hooks exclusively from day one, to ensure that we are learning the current and future variations of React. Even though functional components are the future of React, it is still important to learn the class syntax, as there are billions of lines of legacy React code that you might end up maintaining someday. The same applies to documentation and examples of React that you may stumble across on the internet.
457457

@@ -1115,7 +1115,7 @@ The internet is full of React-related material. However, we use the new style of
11151115

11161116
You may find the following links useful:
11171117

1118-
- The [official React documentation](https://reactjs.org/docs/hello-world.html) is worth checking out at some point, although most of it will become relevant only later on in the course. Also, everything related to class-based components is irrelevant to us;
1118+
- The [official React documentation](https://react.dev/learn) is worth checking out at some point, although most of it will become relevant only later on in the course. Also, everything related to class-based components is irrelevant to us;
11191119
- Some courses on [Egghead.io](https://egghead.io) like [Start learning React](https://egghead.io/courses/start-learning-react) are of high quality, and the recently updated [Beginner's Guide to React](https://egghead.io/courses/the-beginner-s-guide-to-reactjs) is also relatively good; both courses introduce concepts that will also be introduced later on in this course. **NB** The first one uses class components but the latter uses the new functional ones.
11201120

11211121
### Web programmers oath

0 commit comments

Comments
 (0)