achorein / expo-share-intent

🚀 Simple share intent in an Expo Native Module
MIT License
174 stars 15 forks source link

Followed docs - reset share - what do? #75

Closed geetee24 closed 2 months ago

geetee24 commented 3 months ago

resetShareIntent - no idea what this is used for. please explain

achorein commented 3 months ago
  const { hasShareIntent, shareIntent, resetShareIntent, error } = useShareIntent();

when you received a share intent, hasShareIntent is true and shareIntent got the intent data. when calling resetShareIntent we set hasShareIntent to false and shareIntent to null.

it's usefull to change your UI without restarting your app or using an external state.