Skip to content

Commit 99caaab

Browse files
committed
fix reference-react-component
1 parent 0671112 commit 99caaab

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

content/docs/reference-react-component.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -413,23 +413,16 @@ class ErrorBoundary extends React.Component {
413413
}
414414
```
415415

416-
<<<<<<< HEAD
417-
> Megjegyzés
418-
>
419-
> Hiba esetén egy tartelék UI-t renderelhetsz a `componentDidCatch()`-ben a `setState` meghívásával, de ez elavulttá válik majd a következő kiadásokban.
420-
> Ehelyett használd a `static getDerivedStateFromError()`-t a tartalék UI renderelésére.
421-
=======
422-
Production and development builds of React slightly differ in the way `componentDidCatch()` handles errors.
416+
A React production és fejlesztői kiadásai kis mértékben eltérően kezelik a hibákat a `componentDidCatch()` segítségével.
423417

424-
On development, the errors will bubble up to `window`, this means that any `window.onerror` or `window.addEventListener('error', callback)` will intercept the errors that have been caught by `componentDidCatch()`.
418+
A fejlesztői kiadás esetében a hibák felbuborékoznak a `window` objektumig, ami azt jelenti hogy bármely `window.onerror` vagy `window.addEventListener('error', callback)` meghívás felfogja a `componentDidCatch()` által elkapott hibákat.
425419

426-
On production, instead, the errors will not bubble up, which means any ancestor error handler will only receive errors not explicitly caught by `componentDidCatch()`.
420+
A production kiadásban ehelyett a hibák nem buborékoznak fel, ami azt jelenti, hogy bármely leszármazott hibakezelője csak azokat a hibákat fogja felfogni, amik nem lettek kifejezetten a `componentDidCatch()` metódussal elkapva.
427421

428-
> Note
429-
>
430-
> 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.
431-
> Use `static getDerivedStateFromError()` to handle fallback rendering instead.
432-
>>>>>>> adfa67ad01b7e4c6114921cdf12e9e4cf1a1c786
422+
> Megjegyzés
423+
>
424+
> Hiba esetén renderelhetsz egy tartelék UI-t a `componentDidCatch()`-ben a `setState` meghívásával, de ez egy jövőbeli kiadásban ez elavulttá válik.
425+
> Ehelyett használd a `static getDerivedStateFromError()`-t a tartalék UI renderelésére.
433426
434427
* * *
435428

0 commit comments

Comments
 (0)