title: React Native Gifted Chat: How to hide keyboard and text input
body: <p>I am making a react native application using expo and am using <code>react-native-gifted-chat</code> for a chat like feature (<a href="https://github.com/FaridSafi/react-native-gifted-chat" rel="nofollow noreferrer">https://github.com/FaridSafi/react-native-gifted-chat</a>). In this feature, I only want certain users to be able to send a message. The users who cant should only be able to view the messages that have been sent.</p>
  <p>In order to implement this, I need a way to hide the keyboard/text input for the users who are not authorized to send a message. I was reading through the documentation and am unsure of how to do this. Is there a way to hide the keyboard/text input and only load the messages?</p>
  <p>Not sure if this is relevant but my code for the gifted chat is as follows:</p>
  <pre><code>&lt;GiftedChat
        messages={this.state.messages}
        placeholder=&quot;Send your thoughts?&quot;
        onSend={(messages) =&gt; this.sendMessage(messages)}
        user={{
          ...user details
        }}
  /&gt;
  </code></pre>
  <p>Thanks!</p>