You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don’t recommend using indexes for keys if the order of items may change. This can negatively impact performance and may cause issues with component state. Check out Robin Pokorny’s article for an in-depth explanation on the negative impacts of using an index as a key. If you choose not to assign an explicit key to list items then React will default to using indexes as keys.
na tak malou appku to nevadi a asi bych to udelal stejne, ale v ramci uceni by ses mohl podivat jak jinak resit state aplikace - ted si musis hodne veci predavat pres props coz muze do budoucna hodne narust.. tak se da myslim resit bud bez knihoven pres react context nebo knihovnama jako redux, mobx atd. (je potreba si udelat research jakou zvolit, maji svoje vyhody a nevyhody)
Jinak super! uz je z tebe frontendak :)
The text was updated successfully, but these errors were encountered:
https://github.com/WojtylaCZ/p2folio/blob/master/src/components/App.tsx#L58 - toto by slo imho bez vytvareni te arrow fce. Je to detail a zde to nevadi, ale pokud by byla komponenta vetsi a casto se renderovala, tak to muze byt performance issue:
https://github.com/WojtylaCZ/p2folio/blob/master/src/components/PlatformListView.tsx#L13 mam pocit, ze index z pole jako key neni dobra praxe - lepsi je pouzit neco unikatniho z platformy, nejlepe nejake id nebo pripadne nazev.. kdyz pouzijes index, tak by se to mohlo v nekterych pripadech rozbijet.. napr. kdyz odeberes neco z prostredka pole
source: https://reactjs.org/docs/lists-and-keys.html#keys
na tak malou appku to nevadi a asi bych to udelal stejne, ale v ramci uceni by ses mohl podivat jak jinak resit state aplikace - ted si musis hodne veci predavat pres props coz muze do budoucna hodne narust.. tak se da myslim resit bud bez knihoven pres react context nebo knihovnama jako redux, mobx atd. (je potreba si udelat research jakou zvolit, maji svoje vyhody a nevyhody)
Jinak super! uz je z tebe frontendak :)
The text was updated successfully, but these errors were encountered: