{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/9795","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/9795/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/9795/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/9795/events","html_url":"https://github.com/facebook/react-native/pull/9795","id":175556943,"number":9795,"title":"Fix iOS unchanged local assets refetched from packager in development","user":{"login":"jeanregisser","id":57791,"avatar_url":"https://avatars.githubusercontent.com/u/57791?v=3","gravatar_id":"","url":"https://api.github.com/users/jeanregisser","html_url":"https://github.com/jeanregisser","followers_url":"https://api.github.com/users/jeanregisser/followers","following_url":"https://api.github.com/users/jeanregisser/following{/other_user}","gists_url":"https://api.github.com/users/jeanregisser/gists{/gist_id}","starred_url":"https://api.github.com/users/jeanregisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeanregisser/subscriptions","organizations_url":"https://api.github.com/users/jeanregisser/orgs","repos_url":"https://api.github.com/users/jeanregisser/repos","events_url":"https://api.github.com/users/jeanregisser/events{/privacy}","received_events_url":"https://api.github.com/users/jeanregisser/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20review-needed","name":"GH Review: review-needed","color":"fbca04"},{"url":"https://api.github.com/repos/facebook/react-native/labels/Needs%20more%20information","name":"Needs more information","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-07T17:07:41Z","updated_at":"2016-09-08T13:59:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/9795","html_url":"https://github.com/facebook/react-native/pull/9795","diff_url":"https://github.com/facebook/react-native/pull/9795.diff","patch_url":"https://github.com/facebook/react-native/pull/9795.patch"},"body":"Hi,\r\n\r\nThis PR fixes the problem described by @chrisnojima in https://github.com/facebook/react-native/issues/9581#issuecomment-243766310\r\n\r\n**Test plan**\r\n\r\nIn development mode,\r\n- Run an app with an image: `<Image source={ require('./logo.png') }/>`\r\n- Notice that you see the following in packager console:\r\n```txt\r\n6:46:42 PM] <START> processing asset request logo.png\r\n[6:46:42 PM] <END>   processing asset request logo.png (1ms)\r\n```\r\n- Reload the app, or navigate to another page of the app with the same image\r\n- Notice that you see again:\r\n```txt\r\n6:47:23 PM] <START> processing asset request logo.png\r\n[6:47:23 PM] <END>   processing asset request logo.png (1ms)\r\n```\r\n\r\nNow wih the fix applied,\r\nnotice that you only see `logo.png` fetched once, even if you reload or show the same image in a different part of the app.\r\n\r\nLet me know what you think."},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/245606218","html_url":"https://github.com/facebook/react-native/pull/9795#issuecomment-245606218","issue_url":"https://api.github.com/repos/facebook/react-native/issues/9795","id":245606218,"user":{"login":"jeanregisser","id":57791,"avatar_url":"https://avatars.githubusercontent.com/u/57791?v=3","gravatar_id":"","url":"https://api.github.com/users/jeanregisser","html_url":"https://github.com/jeanregisser","followers_url":"https://api.github.com/users/jeanregisser/followers","following_url":"https://api.github.com/users/jeanregisser/following{/other_user}","gists_url":"https://api.github.com/users/jeanregisser/gists{/gist_id}","starred_url":"https://api.github.com/users/jeanregisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeanregisser/subscriptions","organizations_url":"https://api.github.com/users/jeanregisser/orgs","repos_url":"https://api.github.com/users/jeanregisser/repos","events_url":"https://api.github.com/users/jeanregisser/events{/privacy}","received_events_url":"https://api.github.com/users/jeanregisser/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T13:59:33Z","updated_at":"2016-09-08T13:59:33Z","body":"I think it's unexpected to always refetch the same local assets in development mode. \r\n\r\nFor instance, if you have a screen showing 10 local images, the first time it's displayed, they are going to be fetched from the packager and this is normal and expected.\r\nNow if you have another screen using the same local images, it's unexpected that you don't see them immediately as they are refetched again when you navigate to it.\r\n\r\nUp until RN < 0.31.0 local images were just fetched once (unless you changed them).\r\n\r\nThe PR restores this behavior on iOS. And if you change logo.png and reload, you'll see the new logo as expected.\r\nOn Android it doesn't change anything. It was already behaving that way."}}
{"actor":{"display_login":"jeanregisser"}}