How to use Button Component on react-instantsearch

Hello. I’m a new user of algolia.

I have a question about react-instantsearch-native

This is a sample code of InfiniteHits

const InfiniteHits = ({ hits, hasMore, refine }) => (
  keyExtractor={item => item.objectID}
  ItemSeparatorComponent={() => <View style={styles.separator} />}
  onEndReached={() => hasMore && refine()}
  renderItem={({ item }) => (
   <View style={styles.item}>
     <Highlight attribute="title" hit={item} />

InfiniteHits.propTypes = {
 hits: PropTypes.arrayOf(PropTypes.object).isRequired,
 hasMore: PropTypes.bool.isRequired,
 refine: PropTypes.func.isRequired,

export default connectInfiniteHits(InfiniteHits);

My dataset is like this

  title: (the title of the text)
  text: (text)

I’d like to use a button component like when a user taps the button, the text will appear
like this

renderItem={({ item }) => (
   <View style={styles.item}>
     <Highlight attribute="title" hit={item} />
     onPress={ () => {
       <Highlight attribute="text" hit={hits[index]} />

Do you know how to do? Please tell me

Hi @Kohei. This is not related to React InstantSearch itself, but rather React Native in general.
For your use case I would advise reading about how to “hide things with react native”.
There is one article I can point you to:

I hope this helps!

Oh, so I should have checked to react native document.
Thank you for your comment! I’ll do this