Skip to content

Commit 79bdfa0

Browse files
authored
Change links to React lifecycle methods diagram to use HTTPS (#2973)
1 parent 1f7a4b9 commit 79bdfa0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

content/docs/reference-react-component.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The only method you *must* define in a `React.Component` subclass is called [`re
3939
4040
### The Component Lifecycle {#the-component-lifecycle}
4141

42-
Each component has several "lifecycle methods" that you can override to run code at particular times in the process. **You can use [this lifecycle diagram](http://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/) as a cheat sheet.** In the list below, commonly used lifecycle methods are marked as **bold**. The rest of them exist for relatively rare use cases.
42+
Each component has several "lifecycle methods" that you can override to run code at particular times in the process. **You can use [this lifecycle diagram](https://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/) as a cheat sheet.** In the list below, commonly used lifecycle methods are marked as **bold**. The rest of them exist for relatively rare use cases.
4343

4444
#### Mounting {#mounting}
4545

@@ -109,7 +109,7 @@ Each component also provides some other APIs:
109109

110110
### Commonly Used Lifecycle Methods {#commonly-used-lifecycle-methods}
111111

112-
The methods in this section cover the vast majority of use cases you'll encounter creating React components. **For a visual reference, check out [this lifecycle diagram](http://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/).**
112+
The methods in this section cover the vast majority of use cases you'll encounter creating React components. **For a visual reference, check out [this lifecycle diagram](https://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/).**
113113

114114
### `render()` {#render}
115115

@@ -245,7 +245,7 @@ You **should not call `setState()`** in `componentWillUnmount()` because the com
245245

246246
### Rarely Used Lifecycle Methods {#rarely-used-lifecycle-methods}
247247

248-
The methods in this section correspond to uncommon use cases. They're handy once in a while, but most of your components probably don't need any of them. **You can see most of the methods below on [this lifecycle diagram](http://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/) if you click the "Show less common lifecycles" checkbox at the top of it.**
248+
The methods in this section correspond to uncommon use cases. They're handy once in a while, but most of your components probably don't need any of them. **You can see most of the methods below on [this lifecycle diagram](https://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/) if you click the "Show less common lifecycles" checkbox at the top of it.**
249249

250250

251251
### `shouldComponentUpdate()` {#shouldcomponentupdate}
@@ -278,7 +278,7 @@ static getDerivedStateFromProps(props, state)
278278

279279
This method exists for [rare use cases](/blog/2018/06/07/you-probably-dont-need-derived-state.html#when-to-use-derived-state) where the state depends on changes in props over time. For example, it might be handy for implementing a `<Transition>` component that compares its previous and next children to decide which of them to animate in and out.
280280

281-
Deriving state leads to verbose code and makes your components difficult to think about.
281+
Deriving state leads to verbose code and makes your components difficult to think about.
282282
[Make sure you're familiar with simpler alternatives:](/blog/2018/06/07/you-probably-dont-need-derived-state.html)
283283

284284
* If you need to **perform a side effect** (for example, data fetching or an animation) in response to a change in props, use [`componentDidUpdate`](#componentdidupdate) lifecycle instead.
@@ -324,7 +324,7 @@ Only use error boundaries for recovering from unexpected exceptions; **don't try
324324
For more details, see [*Error Handling in React 16*](/blog/2017/07/26/error-handling-in-react-16.html).
325325

326326
> Note
327-
>
327+
>
328328
> Error boundaries only catch errors in the components **below** them in the tree. An error boundary can’t catch an error within itself.
329329
330330
### `static getDerivedStateFromError()` {#static-getderivedstatefromerror}
@@ -353,7 +353,7 @@ class ErrorBoundary extends React.Component {
353353
return <h1>Something went wrong.</h1>;
354354
}
355355
356-
return this.props.children;
356+
return this.props.children;
357357
}
358358
}
359359
```
@@ -408,13 +408,13 @@ class ErrorBoundary extends React.Component {
408408
return <h1>Something went wrong.</h1>;
409409
}
410410
411-
return this.props.children;
411+
return this.props.children;
412412
}
413413
}
414414
```
415415

416416
> Note
417-
>
417+
>
418418
> In the event of an error, you can render a fallback UI with `componentDidCatch()` by calling `setState`, but this will be deprecated in a future release.
419419
> Use `static getDerivedStateFromError()` to handle fallback rendering instead.
420420

0 commit comments

Comments
 (0)