Skip to content

Commit c5581f1

Browse files
authored
Merge pull request #2848 from romanstetsyk/part2e-links
update links to react docs for part2e
2 parents be18322 + ded208c commit c5581f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/2/en/part2e.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ In regular HTML, classes are defined as the value of the <i>class</i> attribute:
7777
<li class="note">some text...</li>
7878
```
7979

80-
In React we have to use the [className](https://reactjs.org/docs/dom-elements.html#classname) attribute instead of the class attribute. With this in mind, let's make the following changes to our <i>Note</i> component:
80+
In React we have to use the [className](https://react.dev/learn#adding-styles) attribute instead of the class attribute. With this in mind, let's make the following changes to our <i>Note</i> component:
8181

8282
```js
8383
const Note = ({ note, toggleImportance }) => {
@@ -205,7 +205,7 @@ The code for the current state of our application can be found in the <i>part2-
205205

206206
React also makes it possible to write styles directly in the code as so-called [inline styles](https://react-cn.github.io/react/tips/inline-styles.html).
207207

208-
The idea behind defining inline styles is extremely simple. Any React component or element can be provided with a set of CSS properties as a JavaScript object through the [style](https://reactjs.org/docs/dom-elements.html#style) attribute.
208+
The idea behind defining inline styles is extremely simple. Any React component or element can be provided with a set of CSS properties as a JavaScript object through the [style](https://react.dev/reference/react-dom/components/common#applying-css-styles) attribute.
209209

210210
CSS rules are defined slightly differently in JavaScript than in normal CSS files. Let's say that we wanted to give some element the color green and italic font that's 16 pixels in size. In CSS, it would look like this:
211211

0 commit comments

Comments
 (0)