title: How Center Components Using Flex in React Native?
body: <p>I'm with difficulties to centralize my components in screen using CSS.</p>
  
  <p>See my <code>App.js</code>:</p>
  
  <pre><code>import { Container } from 'native-base';
  import React from 'react';
  import { StyleSheet } from 'react-native';
  
  import Screen from './ScreenContainer';
  
  const styles = StyleSheet.create({
    container: {
      backgroundColor: '#FF6666',
      flex: 1
    }
  });
  
  const App = () =&gt; (
    &lt;Provider store={store}&gt;
      &lt;Container style={styles.container}&gt;
        &lt;Screen /&gt;
      &lt;/Container&gt;
    &lt;/Provider&gt;
  );
  
  export default App;
  </code></pre>
  
  <p>Now, see my <code>ScreenContainer.js</code></p>
  
  <pre><code>import { Container, Content, Form, Input, Label, Item } from 'native-base';
  import React from 'react';
  
  import AppLogo from '../components/AppLogo';
  
  const Screen = () =&gt; (
    &lt;Container&gt;
      &lt;Content&gt;
        &lt;AppLogo /&gt;
        &lt;Form&gt;
          &lt;Item floatingLabel last&gt;
            &lt;Label&gt;Username&lt;/Label&gt;
            &lt;Input /&gt;
          &lt;/Item&gt;
        &lt;/Form&gt;
      &lt;/Content&gt;
    &lt;/Container&gt;
  );
  
  export default Screen;
  </code></pre>
  
  <p>This code results in this screen:</p>
  
  <p><a href="https://i.stack.imgur.com/9NNzt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9NNzt.png" alt="enter image description here"></a></p>
  
  <p>But, I want that the screen stay with this format:</p>
  
  <p><a href="https://i.stack.imgur.com/P53Yn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/P53Yn.png" alt="enter image description here"></a></p>
  
  <p>When I change the code for:</p>
  
  <pre><code>const styles = StyleSheet.create({
    container: {
      alignItems: 'center',
      backgroundColor: '#FF6666',
      flex: 1
    }
  });
  </code></pre>
  
  <p>My App returns this screen:</p>
  
  <p><a href="https://i.stack.imgur.com/tdxHh.png" rel="noreferrer"><img src="https://i.stack.imgur.com/tdxHh.png" alt="enter image description here"></a></p>