I'm making an android app using react native and I've used TouchableOpacity component to create buttons.  

I use a text input component to accept text from the user and the button should **only be enabled** once the text input matches a certain string.  

I can think of a way to do this by initially rendering the button without the TouchableOpactiy wrapper and re-rendering with the wrapper once the input string matches.  

But I'm guessing there is a much better way to do this. Can anyone help?