title: React Native change button opacity conditionally
body: <p>I created a floating action button and I want to change the opacity when i reach the end of my <code>ScrollView</code>. So I use:</p>
  
  <pre><code>&lt;TouchableOpacity
    activeOpacity={0.5}
    onPress={() =&gt; {
      this.scrollView.scrollToEnd({ animated: true });
      this.setState({ buttonIsRight: false });
    }}
    style={[
      styles.rightFAB,
      this.state.buttonIsRight ? { opacity: 1 } : { opacity: 0 }
    ]}
  &gt;
    &lt;Image
      source={require("../icons/plus.png")}
      style={{
        resizeMode: "center",
        aspectRatio: 1 / 1,
        tintColor: "#888888"
      }}
    /&gt;
  &lt;/TouchableOpacity&gt;;
  </code></pre>
  
  <p>but there is no change in <code>opacity</code> at all! I set <code>onPress</code> to scroll to end and change a state so i can change the opacity based on that state.</p>
  
  <p>Any idea?</p>
  
  <blockquote>
    <p>Thanks in advance!</p>
  </blockquote>