title: Is there a way to insert and centered in the header an image + a text, using react navigation?
body: <p>I'm trying to insert in my header a photo and a text using react navigation for a react native app.</p>
  
  <p>To do so, I've try couple of things. All failed. For my previous shot, I've try to create a React component containing my image and my text and then used it as 'title' in the navigationOptions (code below).</p>
  
  <pre><code>// this is my component page
  import React from 'react'
  import { Image, StyleSheet, View, Text } from 'react-native'
  
  export default class ImageHeader extends React.Component {
      render() {
          return (
              &lt;View style={styles.container}&gt;
                  &lt;Image
                      style={styles.image}
                      source={require('../../assets/pic.png')}
                      resizeMode='contain'
                  /&gt;
                  &lt;Text style={styles.text}&gt;
                      Title_Page1
                  &lt;/Text&gt;
              &lt;/View&gt;
          )
      }
  }
  
  const styles = StyleSheet.create({
      container: {
          flex: 1,
          flexDirection: 'row',
          justifyContent: 'center',
          alignItems: 'center',
      },
  
      image: {
          width: 25,
          height: 25,
          zIndex: 999
      },
  
      text: {
          fontSize: 12
      }
  
  })
  
  // and then, in my navigation page:
  
          Page1: {
              screen: Page1,
              navigationOptions: {
                  title: &lt;ImageHeader/&gt;
              }
          },
  </code></pre>
  
  <p>But unfortunately, I got this error: "Error: Invalid title for route "Page1" - title must be string or null, instead it was of type object".</p>
  
  <p>I understand the error message, this way of doing is probably not possible. Would you guys have any idea how to do that?</p>
  
  <p>Thanks!</p>