{"action":"created","issue":{"url":"https://api.github.com/repos/kolodny/weak-key/issues/1","repository_url":"https://api.github.com/repos/kolodny/weak-key","labels_url":"https://api.github.com/repos/kolodny/weak-key/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/kolodny/weak-key/issues/1/comments","events_url":"https://api.github.com/repos/kolodny/weak-key/issues/1/events","html_url":"https://github.com/kolodny/weak-key/issues/1","id":164179824,"number":1,"title":"Using map","user":{"login":"mariotacke","id":4942019,"avatar_url":"https://avatars2.githubusercontent.com/u/4942019?v=4","gravatar_id":"","url":"https://api.github.com/users/mariotacke","html_url":"https://github.com/mariotacke","followers_url":"https://api.github.com/users/mariotacke/followers","following_url":"https://api.github.com/users/mariotacke/following{/other_user}","gists_url":"https://api.github.com/users/mariotacke/gists{/gist_id}","starred_url":"https://api.github.com/users/mariotacke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariotacke/subscriptions","organizations_url":"https://api.github.com/users/mariotacke/orgs","repos_url":"https://api.github.com/users/mariotacke/repos","events_url":"https://api.github.com/users/mariotacke/events{/privacy}","received_events_url":"https://api.github.com/users/mariotacke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-06T21:34:07Z","updated_at":"2018-02-06T19:18:59Z","closed_at":null,"author_association":"NONE","body":"In your example, you import your library and use it on the individual item to generate a key. How does this approach compare to just using the index parameter of the [.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) callback?\n\n```\nexport default function Todo(items) {\n  return (\n    <ul>\n      {\n        items.map((item, i) =>\n          <li key={i}>{item.text}</li>\n        )\n      }\n    </ul>\n  );\n}\n```\n"},"comment":{"url":"https://api.github.com/repos/kolodny/weak-key/issues/comments/363534202","html_url":"https://github.com/kolodny/weak-key/issues/1#issuecomment-363534202","issue_url":"https://api.github.com/repos/kolodny/weak-key/issues/1","id":363534202,"user":{"login":"alexkrolick","id":1571667,"avatar_url":"https://avatars3.githubusercontent.com/u/1571667?v=4","gravatar_id":"","url":"https://api.github.com/users/alexkrolick","html_url":"https://github.com/alexkrolick","followers_url":"https://api.github.com/users/alexkrolick/followers","following_url":"https://api.github.com/users/alexkrolick/following{/other_user}","gists_url":"https://api.github.com/users/alexkrolick/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkrolick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkrolick/subscriptions","organizations_url":"https://api.github.com/users/alexkrolick/orgs","repos_url":"https://api.github.com/users/alexkrolick/repos","events_url":"https://api.github.com/users/alexkrolick/events{/privacy}","received_events_url":"https://api.github.com/users/alexkrolick/received_events","type":"User","site_admin":false},"created_at":"2018-02-06T19:18:59Z","updated_at":"2018-02-06T19:18:59Z","author_association":"NONE","body":"Using the index only works if you only append or remove items from the end of the array. Removing an item from the list causes the next item to take its index. Weakmap is very useful for these contexts 😄 ."}}
{"actor":{"display_login":"alexkrolick"}}