Skip to content

How to use RNTooltips API in functional components #43

Description

@shivamka1

Hi @prscX,

I am not able to figure out how would I really use RNTooltips API with functional components. Please guide.

null is not an object (evaluating 'RNTooltips.Show')

Show
RNToolTips.js:118:15

I am trying to raise tool tips upon onDayLongPress on a https://github.com/wix/react-native-calendars.

What I have done so far is:

   const [parent, setParent] = useState(null);

    const _onDayLongPress = e => {
            RNTooltips.Show(
                parent,
                parent,
                {
                    text: 'Long Press Description'
                }
            )
    }
     <Calendar
          ref={setParent}
          onDayLongPress={_onDayLongPress}
      />

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions