Skip to content

Commit 5188bee

Browse files
committed
not needed comment
1 parent c2cf09b commit 5188bee

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/content/8/es/part8b.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,6 @@ useEffect(() => {
844844
// highlight-end
845845
```
846846
847-
<!-- Tämä ratkaisu ei kuitenkaan toimi, ellei _notify_-funktiota ole määritelty [useCallback] (https://reactjs.org/docs/hooks-reference.html#usecallback) -funktioon käärittynä. Jos näin ei tehdä, seurauksena en ikuinen luuppi, sillä aina kun komponentti _App_ renderöidään uudelleen notifikaation poistamisen jälkeen, syntyy <i> uusi versio </i> funktiosta _notify_ ja se taas aiheunkastionaituauden ... -->
848847
Sin embargo, esta solución no funciona si la función _notify_ no está envuelta en una función [useCallback](https://reactjs.org/docs/hooks-reference.html#usecallback). Si no es así, el resultado es un bucle sin fin. Cuando el componente _App_ se rerenderiza después de haber retirado una notificación, un <i>nueva versión</ i> de _notify_ se crea lo que hace que la función de efectos que se ejecute lo que provoca una nueva notificación y así sucesivamente una así sucesivamente...
849848
850849
El código actual de la aplicación se puede encontrar en [Github](https://github.com/fullstack-hy2020/graphql-phonebook-frontend/tree/part8-5) branch <i>part8-5</i>.

0 commit comments

Comments
 (0)