JSPM

react-native-pop-toast

0.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q35359F
  • License MIT

react-native-pop-toast

Package Exports

  • react-native-pop-toast
  • react-native-pop-toast/package.json

Readme

React Native Pop Toast

React Native Pop Toast is a small library to show quick, animated toast messages in your app. Easy to use and lightweight.

React Native Pop Toast

Installation

npm install react-native-pop-toast

Usage

App.tsx

  import { ToastProvider } from 'react-native-pop-toast';

  ...

  <ToastProvider>
    <HomeScreen />
  </ToastProvider>

  ...

HomeScreen.tsx

  import { useToast } from 'react-native-pop-toast';

  ...

  const { showToast } = useToast();

  return (
    <View
      style={{
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        gap: 5,
      }}
    >
      <Button
        title="Success"
        onPress={() => showToast('Successful!', 'success')}
      />
      <Button
        title="Error"
        onPress={() => showToast('An error occurred!', 'error')}
      />
      <Button title="Info" onPress={() => showToast('Information message')} />
    </View>
  );

License

MIT


Made with create-react-native-library