{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/4094","labels_url":"https://api.github.com/repos/facebook/react-native/issues/4094/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/4094/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/4094/events","html_url":"https://github.com/facebook/react-native/issues/4094","id":116529599,"number":4094,"title":"[Suggestion] Add doc clarification whether RN Flexbox uses dp or pixel as the unit of sizing values","user":{"login":"ACCTFORGH","id":9537740,"avatar_url":"https://avatars.githubusercontent.com/u/9537740?v=3","gravatar_id":"","url":"https://api.github.com/users/ACCTFORGH","html_url":"https://github.com/ACCTFORGH","followers_url":"https://api.github.com/users/ACCTFORGH/followers","following_url":"https://api.github.com/users/ACCTFORGH/following{/other_user}","gists_url":"https://api.github.com/users/ACCTFORGH/gists{/gist_id}","starred_url":"https://api.github.com/users/ACCTFORGH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ACCTFORGH/subscriptions","organizations_url":"https://api.github.com/users/ACCTFORGH/orgs","repos_url":"https://api.github.com/users/ACCTFORGH/repos","events_url":"https://api.github.com/users/ACCTFORGH/events{/privacy}","received_events_url":"https://api.github.com/users/ACCTFORGH/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-12T11:13:33Z","updated_at":"2015-11-12T18:41:24Z","closed_at":"2015-11-12T18:41:24Z","body":"I was used to using dp in native Android but I am really confused whether the default unit used for Flexbox sizes is dp or pixels.  In the documentation, there is the code below that suggests it uses dp instead of pixel as the size unit. Here the getPixelSizeForLayoutSize() function tries to convert dp values to pixel values. However, in real applications, my components get out of screen bound when not dividing the size values (height/width, etc) by PixelRatio.get(). Would really appreciate your clarification!\r\n\r\nvar image = getImage({\r\n  width: PixelRatio.getPixelSizeForLayoutSize(200),\r\n  height: PixelRatio.getPixelSizeForLayoutSize(100),\r\n});\r\n<Image source={image} style={{width: 200, height: 100}} />\r\n\r\nSame question raised in StackOverflow: http://stackoverflow.com/questions/33670100/does-flexbox-in-react-native-use-dp-or-pixel"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/156196984","html_url":"https://github.com/facebook/react-native/issues/4094#issuecomment-156196984","issue_url":"https://api.github.com/repos/facebook/react-native/issues/4094","id":156196984,"user":{"login":"ide","id":379606,"avatar_url":"https://avatars.githubusercontent.com/u/379606?v=3","gravatar_id":"","url":"https://api.github.com/users/ide","html_url":"https://github.com/ide","followers_url":"https://api.github.com/users/ide/followers","following_url":"https://api.github.com/users/ide/following{/other_user}","gists_url":"https://api.github.com/users/ide/gists{/gist_id}","starred_url":"https://api.github.com/users/ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ide/subscriptions","organizations_url":"https://api.github.com/users/ide/orgs","repos_url":"https://api.github.com/users/ide/repos","events_url":"https://api.github.com/users/ide/events{/privacy}","received_events_url":"https://api.github.com/users/ide/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T18:41:24Z","updated_at":"2015-11-12T18:41:24Z","body":"Answered on SO. If you want to send a PR to add a short note to the docs we can take a look and help merge it."}}