How to use the @expo/react-native-action-sheet.useActionSheet function in @expo/react-native-action-sheet

To help you get started, we’ve selected a few @expo/react-native-action-sheet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dooboolab / hackatalk-mobile / src / components / screen / ProfileUpdate.tsx View on Github external
function Screen(props: Props): React.ReactElement {
  const [isUpdating, setIsUpdating] = useState(false);
  const [displayName, setDisplayName] = useState('');
  const [statusMsg, setStatusMsg] = useState('');
  const { showActionSheetWithOptions } = useActionSheet();
  const [profilePath, setProfilePath] = useState('');

  useEffect(() => {
    if (isUpdating) {
      try {
        if (props.navigation) {
          props.navigation.goBack();
        }
      } catch (err) {
        // console.error(err);
      } finally {
        setIsUpdating(false);
      }
    }
  }, [isUpdating]);

@expo/react-native-action-sheet

A cross-platform ActionSheet for React Native

MIT
Latest version published 8 days ago

Package Health Score

86 / 100
Full package analysis