title: React Native best practice for positioning, favor percentages and calculations over flex?
body: <p>Coming from a web background it would be considered bad practice to (or not possible) to absolutely position elements and calculate their position in a layout based on the window dimensions. In react-native, we have access to the dimensions of the view port through the <code>React.Dimensions</code>.</p>
  
  <p>For example: <code>let {height, width} = Dimensions.get('window')</code></p>
  
  <p>I can now use that to center a 100px element by setting it so:</p>
  
  <p><code>left: (width/2) - 50</code></p>
  
  <p>I much prefer this to using more traditional css techniques. Is there a reason why this shouldn't be done? In a browser the viewport could change if the user resizes the window, but on mobile the viewport size will be static.</p>