{"id":3540,"date":"2021-07-24T08:53:39","date_gmt":"2021-07-24T08:53:39","guid":{"rendered":"http:\/\/the-codest.localhost\/blog\/react-keys-yes-you-need-them-but-why-exactly\/"},"modified":"2026-04-24T11:30:22","modified_gmt":"2026-04-24T11:30:22","slug":"reageerivad-votmed-jah-te-vajate-neid-kuid-miks-tapselt","status":"publish","type":"post","link":"https:\/\/thecodest.co\/et\/blog\/react-keys-yes-you-need-them-but-why-exactly\/","title":{"rendered":"React V\u00f5tmed, jah! Sa vajad neid, aga miks t\u00e4pselt?"},"content":{"rendered":"<p>On ka veel \u00fcks asi, mida peate meeles pidama ja see on <strong><a href=\"https:\/\/thecodest.co\/et\/blog\/conditional-component-visibility-in-react\/\">React<\/a> Key<\/strong> atribuuti, peab see olema igal renderdatud loendi elemendil. See kontseptsioon on \u00fcks esimesi asju, mida iga front-end <a href=\"https:\/\/thecodest.co\/et\/blog\/hire-vue-js-developers\/\">arendaja<\/a> saab teada <strong>React<\/strong> nende reisi alguses. N\u00fc\u00fcd kaevume veidi s\u00fcgavamale, et uurida, miks see nii on ja millal me saame v\u00f5tta m\u00f5ningaid otseteid.<\/p>\n<h2>Miks on meil seda v\u00f5tmeatribuuti vaja?<\/h2>\n<p>K\u00f5ige lihtsam vastus oleks siinkohal \"optimeerida re-renderdusi\", kuid t\u00e4ielikum vastus peab v\u00e4hemalt mainima m\u00f5istet <strong>React Koosk\u00f5lastamine<\/strong>. See on protsess, mille k\u00e4igus selgitatakse v\u00e4lja, kuidas uuendada kasutajaliidest k\u00f5ige t\u00f5husamal viisil. Et seda kiiresti teha, <strong>React<\/strong> peab otsustama, milliseid elementide puu osi on vaja uuendada ja milliseid mitte. Asi on selles, et DOMis v\u00f5ib olla palju elemente ja iga elemendi v\u00f5rdlemine otsustamisel, millist neist tuleks uuendada, on \u00fcsna kallis. Selle optimeerimiseks, <strong>React<\/strong> rakendab difing-algoritmi, mis p\u00f5hineb kahel eeldusel:<\/p>\n<ol>\n<li>Kaks erinevat t\u00fc\u00fcpi elementi ei ole kunagi \u00fchesugused - seega renderige need uuesti.<\/li>\n<li>Arendajad saavad k\u00e4sitsi aidata seda protsessi optimeerida v\u00f5tmeatribuutide abil, nii et elemendid, isegi kui nende j\u00e4rjekord on muutunud, on v\u00f5imalik kiiremini lokaliseerida ja v\u00f5rrelda.<\/li>\n<\/ol>\n<p>Selle p\u00f5hjal v\u00f5ime j\u00e4reldada, et iga <strong>React v\u00f5ti<\/strong> peaks samuti olema unikaalne (elementide loetelus, mitte globaalselt) ja stabiilne (ei tohiks muutuda). Aga mis v\u00f5ib juhtuda, kui nad ei ole tat?<\/p>\n<h2>Ainulaadsus, stabiilsus ja massiiviindeks<\/h2>\n<p>Nagu me juba varem mainisime, <strong>React klahvid<\/strong> peaks olema stabiilne ja ainulaadne. K\u00f5ige lihtsam viis selle saavutamiseks on kasutada unikaalset ID-d (n\u00e4iteks andmebaasist) ja anda see igale elemendile massiivi kaardistamisel \u00fcle, lihtne. Aga kuidas on olukordadega, kus meil ei ole ID-d, nime v\u00f5i muid unikaalseid identifikaatoreid, mida igale elemendile edastada? Noh, kui me ei edasta midagi v\u00f5tmeks, <strong>React<\/strong> v\u00f5tab vaikimisi praeguse massiivi indeksi (kuna see on selles loetelus unikaalne), et seda k\u00e4sitleda jaoks <a href=\"https:\/\/thecodest.co\/et\/blog\/why-us-companies-are-opting-for-polish-developers\/\">us<\/a>, kuid see annab meile ka kena veateate konsooli:<\/p>\n<p><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/fWmP92MWlEdiEo-qINf6WxkfB9ruVrgPnGBCQQwRjm4L2ZplXm72UmL-ChyoXxMbXTuSCkhYGIstU7l6EhT8vSeOrcyuaAqqPn4eYTYp8nXKqqIX5Q72T3Eh93Dg33WWQz9ciCws0.png\" alt=\"\" \/><\/p>\n<p>Miks see nii on? Vastus on selles, et massiivi indeks ei ole stabiilne. Kui elementide j\u00e4rjekord muutub, muutub iga v\u00f5ti ja meil on probleem. Kui <strong>React<\/strong> kohtub olukorras, kus elementide j\u00e4rjekord loetelus on muutunud, p\u00fc\u00fcab ta neid ikkagi v\u00f5rrelda v\u00f5tmete j\u00e4rgi, mis t\u00e4hendab, et iga v\u00f5rdlus l\u00f5peb komponendi \u00fcmberehitamisega ja selle tulemusena ehitatakse kogu loetelu uuesti nullist \u00fcles. Lisaks sellele v\u00f5ib tekkida ootamatuid probleeme, n\u00e4iteks komponentide oleku uuendamine elementide puhul nagu kontrollimata sisendid ja muud maagilised raskesti vea k\u00f5rvaldatavad probleemid.<\/p>\n<h2>Erandid<\/h2>\n<p>Tuleme tagasi massiivi indeksi juurde. Kui kasutame seda kui <strong>React v\u00f5ti<\/strong> v\u00f5ib olla nii problemaatiline, miks <strong>React<\/strong> kasutab seda vaikimisi? Kas on m\u00f5ni kasutusjuhtum, kus see on okei? Vastus on jah, kasutusjuhtumiks on staatilised nimekirjad. Kui sa oled kindel, et renderdatav nimekiri ei muuda kunagi oma j\u00e4rjekorda, siis on ohutu kasutada massiivi indeksit, kuid pea meeles, et kui sul on mingid unikaalsed identifikaatorid, siis on ikkagi parem neid kasutada selle asemel. Samuti v\u00f5ite m\u00e4rgata, et indeksite edastamine v\u00f5tmetena muudab <strong>React<\/strong> veateade kaob, samal ajal k\u00e4ivitades m\u00f5ned v\u00e4lised linterid, et kuvada viga v\u00f5i hoiatus. Selle p\u00f5hjuseks on asjaolu, et indeksite selges\u00f5nalist kasutamist v\u00f5tmetena peetakse halvaks tavaks ja m\u00f5ned linterid v\u00f5ivad seda k\u00e4sitleda veana, samas kui <strong>React<\/strong> ise peab seda \"arendajad teavad, mida nad teevad\" olukorraks - seega \u00e4rge tehke seda, kui te t\u00f5esti ei tea, mida teete.  M\u00f5ned n\u00e4ited, millal v\u00f5ib olla okei kasutada seda erandit, oleks rippmen\u00fc\u00fc staatilise nuppude loeteluga v\u00f5i elementide loetelu kuvamine teie ettev\u00f5tte aadressiandmetega.<\/p>\n<h2>Alternatiiv andmekogumip\u00f5hisele v\u00f5tmele<\/h2>\n<p>Oletame, et \u00fckski eespool nimetatud variantidest ei ole meie jaoks v\u00f5imalik. N\u00e4iteks peame kuvama stringide massiivil p\u00f5hinevat elementide nimekirja, mida saab dubleerida, kuid mida saab ka \u00fcmber j\u00e4rjestada. Sellisel juhul ei saa me kasutada \u00fchtegi stringi, sest need ei ole unikaalsed (see v\u00f5ib p\u00f5hjustada ka m\u00f5ningaid maagilisi vigu) ja massiivi indeks ei ole piisavalt hea, sest me muudame elementide j\u00e4rjekorda. Viimane asi, millele me saame sellises olukorras toetuda, on m\u00f5ne v\u00e4lise identifikaatori kasutamine. Pidage meeles, et see peab olema stabiilne, nii et me ei saa lihtsalt kasutada Math.random(). On olemas m\u00f5ned NPM-i paketid, mida me saame sellistel juhtudel kasutada, n\u00e4iteks <a href=\"https:\/\/www.npmjs.com\/package\/uuid\" rel=\"nofollow\">\"uuid\"<\/a> pakett. Sellised t\u00f6\u00f6riistad aitavad meil hoida meie nimekirja v\u00f5tmed stabiilsed ja unikaalsed, isegi kui me ei leia \u00f5igeid identifikaatoreid oma <a href=\"https:\/\/thecodest.co\/et\/blog\/app-data-collection-security-risks-value-and-types-explored\/\">andmed<\/a> komplekt. Me peaksime kaaluma andmebaasi ID ja massiiviindeksi kasutamist (kui see on v\u00f5imalik) k\u00f5igepealt, et minimeerida meie poolt kasutatavate pakettide arvu. <a href=\"https:\/\/thecodest.co\/et\/dictionary\/why-do-projects-fail\/\">projekt<\/a>.<\/p>\n<h2>Kokkuv\u00f5tteks<\/h2>\n<ul>\n<li>Iga element nimekirjas <strong>React<\/strong> elementidel peaks olema unikaalne ja stabiilne v\u00f5tmeatribuut,<\/li>\n<li><strong>React klahvid<\/strong> kasutatakse selleks, et kiirendada <strong>Lepitusprotsess<\/strong> ja v\u00e4ltida nimekirjade elementide asjatut \u00fcmberehitamist,<\/li>\n<li>Parim allikas v\u00f5tmete jaoks on andmete sisestamise unikaalne ID (n\u00e4iteks andmebaasist),<\/li>\n<li>V\u00f5id kasutada massiivi indeksit v\u00f5tmena, kuid ainult staatilise loendi puhul, mille j\u00e4rjekord ei muutu,<\/li>\n<li>Kui ei ole muud v\u00f5imalust saada stabiilseid ja unikaalseid v\u00f5tmeid, kaaluge m\u00f5ne v\u00e4lise ID-teenuse pakkuja, n\u00e4iteks paketi \"uuid\" kasutamist.<\/li>\n<\/ul>\n<p><article-inline-code-review><\/article-inline-code-review><\/p>\n<p><b>Loe edasi:<\/b><\/p>\n<p><a href=\"https:\/\/thecodest.co\/blog\/why-you-should-probably-use-typescript\">Miks peaksite (t\u00f5en\u00e4oliselt) kasutama Typescript'i<\/a><\/p>\n<p><a href=\"https:\/\/thecodest.co\/blog\/how-not-to-kill-a-project-with-bad-coding-practices\/\">Kuidas mitte tappa projekti halbade kodeerimistavadega?<\/a><\/p>\n<p><a href=\"https:\/\/thecodest.co\/blog\/data-fetching-strategies-in-nextjs\/\">NextJS-i andmete hankimise strateegiad<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Massiivi teisendamine elementide loendiks React abil on \u00fcsna lihtne, p\u00f5him\u00f5tteliselt on vaja vaid seda massiivi kaardistada ja tagastada iga massiivi elemendi jaoks sobiv element.<\/p>","protected":false},"author":2,"featured_media":3541,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-3540","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>React Keys, Yes! You Need Them, but Why Exactly? - The Codest<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thecodest.co\/et\/blogi\/reageerivad-votmed-jah-te-vajate-neid-kuid-miks-tapselt\/\" \/>\n<meta property=\"og:locale\" content=\"et_EE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"React Keys, Yes! You Need Them, but Why Exactly?\" \/>\n<meta property=\"og:description\" content=\"Transforming an array into a list of elements with React is pretty straightforward, basically all you need to do is map that array and return the proper element for every array item.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thecodest.co\/et\/blogi\/reageerivad-votmed-jah-te-vajate-neid-kuid-miks-tapselt\/\" \/>\n<meta property=\"og:site_name\" content=\"The Codest\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-24T08:53:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-24T11:30:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/react_keys_cover.png\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"thecodest\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"thecodest\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutit\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/react-keys-yes-you-need-them-but-why-exactly\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/react-keys-yes-you-need-them-but-why-exactly\\\/\"},\"author\":{\"name\":\"thecodest\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\"},\"headline\":\"React Keys, Yes! You Need Them, but Why Exactly?\",\"datePublished\":\"2021-07-24T08:53:39+00:00\",\"dateModified\":\"2026-04-24T11:30:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/react-keys-yes-you-need-them-but-why-exactly\\\/\"},\"wordCount\":988,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/react-keys-yes-you-need-them-but-why-exactly\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/react_keys_cover.png\",\"articleSection\":[\"Software Development\"],\"inLanguage\":\"et\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/react-keys-yes-you-need-them-but-why-exactly\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/react-keys-yes-you-need-them-but-why-exactly\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/react-keys-yes-you-need-them-but-why-exactly\\\/\",\"name\":\"React Keys, Yes! You Need Them, but Why Exactly? - The Codest\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/react-keys-yes-you-need-them-but-why-exactly\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/react-keys-yes-you-need-them-but-why-exactly\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/react_keys_cover.png\",\"datePublished\":\"2021-07-24T08:53:39+00:00\",\"dateModified\":\"2026-04-24T11:30:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/react-keys-yes-you-need-them-but-why-exactly\\\/#breadcrumb\"},\"inLanguage\":\"et\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/react-keys-yes-you-need-them-but-why-exactly\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"et\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/react-keys-yes-you-need-them-but-why-exactly\\\/#primaryimage\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/react_keys_cover.png\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/react_keys_cover.png\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/react-keys-yes-you-need-them-but-why-exactly\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thecodest.co\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"React Keys, Yes! You Need Them, but Why Exactly?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"name\":\"The Codest\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thecodest.co\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"et\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\",\"name\":\"The Codest\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"et\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"width\":144,\"height\":36,\"caption\":\"The Codest\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/pl.linkedin.com\\\/company\\\/codest\",\"https:\\\/\\\/clutch.co\\\/profile\\\/codest\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\",\"name\":\"thecodest\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"et\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"caption\":\"thecodest\"},\"url\":\"https:\\\/\\\/thecodest.co\\\/et\\\/author\\\/thecodest\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"React V\u00f5tmed, jah! Sa vajad neid, aga miks t\u00e4pselt? - The Codest","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thecodest.co\/et\/blogi\/reageerivad-votmed-jah-te-vajate-neid-kuid-miks-tapselt\/","og_locale":"et_EE","og_type":"article","og_title":"React Keys, Yes! You Need Them, but Why Exactly?","og_description":"Transforming an array into a list of elements with React is pretty straightforward, basically all you need to do is map that array and return the proper element for every array item.","og_url":"https:\/\/thecodest.co\/et\/blogi\/reageerivad-votmed-jah-te-vajate-neid-kuid-miks-tapselt\/","og_site_name":"The Codest","article_published_time":"2021-07-24T08:53:39+00:00","article_modified_time":"2026-04-24T11:30:22+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/react_keys_cover.png","type":"image\/png"}],"author":"thecodest","twitter_card":"summary_large_image","twitter_misc":{"Written by":"thecodest","Est. reading time":"5 minutit"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thecodest.co\/blog\/react-keys-yes-you-need-them-but-why-exactly\/#article","isPartOf":{"@id":"https:\/\/thecodest.co\/blog\/react-keys-yes-you-need-them-but-why-exactly\/"},"author":{"name":"thecodest","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76"},"headline":"React Keys, Yes! You Need Them, but Why Exactly?","datePublished":"2021-07-24T08:53:39+00:00","dateModified":"2026-04-24T11:30:22+00:00","mainEntityOfPage":{"@id":"https:\/\/thecodest.co\/blog\/react-keys-yes-you-need-them-but-why-exactly\/"},"wordCount":988,"commentCount":0,"publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"image":{"@id":"https:\/\/thecodest.co\/blog\/react-keys-yes-you-need-them-but-why-exactly\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/react_keys_cover.png","articleSection":["Software Development"],"inLanguage":"et","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thecodest.co\/blog\/react-keys-yes-you-need-them-but-why-exactly\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thecodest.co\/blog\/react-keys-yes-you-need-them-but-why-exactly\/","url":"https:\/\/thecodest.co\/blog\/react-keys-yes-you-need-them-but-why-exactly\/","name":"React V\u00f5tmed, jah! Sa vajad neid, aga miks t\u00e4pselt? - The Codest","isPartOf":{"@id":"https:\/\/thecodest.co\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thecodest.co\/blog\/react-keys-yes-you-need-them-but-why-exactly\/#primaryimage"},"image":{"@id":"https:\/\/thecodest.co\/blog\/react-keys-yes-you-need-them-but-why-exactly\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/react_keys_cover.png","datePublished":"2021-07-24T08:53:39+00:00","dateModified":"2026-04-24T11:30:22+00:00","breadcrumb":{"@id":"https:\/\/thecodest.co\/blog\/react-keys-yes-you-need-them-but-why-exactly\/#breadcrumb"},"inLanguage":"et","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thecodest.co\/blog\/react-keys-yes-you-need-them-but-why-exactly\/"]}]},{"@type":"ImageObject","inLanguage":"et","@id":"https:\/\/thecodest.co\/blog\/react-keys-yes-you-need-them-but-why-exactly\/#primaryimage","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/react_keys_cover.png","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/react_keys_cover.png","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/thecodest.co\/blog\/react-keys-yes-you-need-them-but-why-exactly\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thecodest.co\/"},{"@type":"ListItem","position":2,"name":"React Keys, Yes! You Need Them, but Why Exactly?"}]},{"@type":"WebSite","@id":"https:\/\/thecodest.co\/#website","url":"https:\/\/thecodest.co\/","name":"The Codest","description":"","publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thecodest.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"et"},{"@type":"Organization","@id":"https:\/\/thecodest.co\/#organization","name":"The Codest","url":"https:\/\/thecodest.co\/","logo":{"@type":"ImageObject","inLanguage":"et","@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","width":144,"height":36,"caption":"The Codest"},"image":{"@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/pl.linkedin.com\/company\/codest","https:\/\/clutch.co\/profile\/codest"]},{"@type":"Person","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76","name":"thecodest","image":{"@type":"ImageObject","inLanguage":"et","@id":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","caption":"thecodest"},"url":"https:\/\/thecodest.co\/et\/author\/thecodest\/"}]}},"_links":{"self":[{"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/posts\/3540","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/comments?post=3540"}],"version-history":[{"count":5,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/posts\/3540\/revisions"}],"predecessor-version":[{"id":7970,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/posts\/3540\/revisions\/7970"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/media\/3541"}],"wp:attachment":[{"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/media?parent=3540"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/categories?post=3540"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecodest.co\/et\/wp-json\/wp\/v2\/tags?post=3540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}