Skip to content

Releases: diyardev/react-native-dynamic-toast

🚀 v1.2.0 - Major Release: Enhanced Positioning & Auto-Dismiss

Choose a tag to compare

@diyardev diyardev released this 24 Sep 21:47

Release Notes

v1.2.0 - Major Release: Enhanced Positioning & Auto-Dismiss 🚀

✨ New Features

  • Enhanced Bottom Positioning - Fixed bottom toast positioning with absolute layout for perfect screen alignment
  • Extended Auto-Dismiss Duration - Increased default auto-dismiss to 5 seconds for better user experience
  • Smart Default Handling - Improved undefined value handling for duration and position properties
  • Production Ready - Removed all debug messages for clean production builds

🐛 Critical Bug Fixes

  • Spread Operator Issue - Fixed spread operator overriding default values in ToastContext
  • Bottom Toast Positioning - Resolved bottom toasts appearing at top due to incorrect CSS positioning
  • Duration Handling - Fixed undefined duration preventing auto-dismiss functionality
  • Position Filtering - Enhanced toast filtering logic for better position-based rendering

🔧 Technical Improvements

  • Better TypeScript Support - Enhanced type safety with proper undefined checks
  • Cleaner Code Structure - Refactored components for better maintainability
  • Optimized Rendering - Improved performance with better conditional rendering
  • CSS Architecture - Restructured styles with absolute positioning for bottom toasts

📦 Installation

npm install @diyardev/react-native-dynamic-toast@1.2.0
# or
yarn add @diyardev/react-native-dynamic-toast@1.2.0

🎯 Usage Examples

// Top position (default, 5 seconds auto-dismiss)
ToastAPI.error('Please fill all fields');

// Bottom position with custom duration
ToastAPI.success('Login successful!', { 
  position: 'bottom',
  duration: 3000 
});

// Validation errors
ToastAPI.errorWithValidation('Validation failed', {
  email: ['Email is required'],
  password: ['Password must be at least 6 characters']
});

🔄 Breaking Changes

None! This release is fully backward compatible.

📱 Enhanced Compatibility

  • React Native >= 0.60.0
  • React >= 16.8.0
  • TypeScript 5.0+ support
  • iOS and Android tested
  • Safe area context support

🎨 Visual Improvements

  • Perfect Bottom Alignment - Bottom toasts now appear exactly at screen bottom
  • Consistent Spacing - Improved margins and padding for both positions
  • Smooth Animations - Enhanced enter/exit animations for all positions
  • Better Touch Handling - Non-blocking touch events preserved

🚀 Performance

  • Faster Rendering - Optimized component re-renders
  • Smaller Bundle - Removed debug code reduces bundle size
  • Memory Efficient - Better cleanup of toast timers

📄 License

MIT License - see LICENSE file for details.

👨‍💻 Author

Created by diyardev


Full Changelog: v1.0.0...v1.2.0

Documentation: README.md

1.0.0 - Initial Release

Choose a tag to compare

@diyardev diyardev released this 24 Sep 20:12

Release Notes

v1.0.0 - Initial Release 🎉

🚀 Features

  • Beautiful Toast Notifications - Modern, clean and customizable toast notifications
  • TypeScript Support - Full TypeScript support with comprehensive type definitions
  • Dynamic Positioning - Support for both top and bottom positioning
  • Auto Dismiss - Configurable auto-dismiss duration (default: 3 seconds)
  • Touch Friendly - Non-blocking touch events, you can interact with the app while toasts are visible
  • Multiple Types - Success, Error, and custom toast types
  • Validation Support - Support for validation errors with multiple messages
  • Smooth Animations - Beautiful enter/exit animations
  • Safe Area Support - Works perfectly with modern devices and notches
  • Lightweight - Minimal dependencies and small bundle size

📦 Installation

npm install @diyardev/react-native-dynamic-toast
# or
yarn add @diyardev/react-native-dynamic-toast

🎯 Quick Start

import { ToastProvider, Toast, ToastAPI } from '@diyardev/react-native-dynamic-toast';

// Setup
<ToastProvider>
  <YourApp />
  <Toast />
</ToastProvider>

// Usage
ToastAPI.success('Success message!');
ToastAPI.error('Error message!');

🔧 API

  • ToastAPI.success(message, options?) - Show success toast
  • ToastAPI.error(message, options?) - Show error toast
  • ToastAPI.errorWithValidation(message, errors, options?) - Show validation errors

📱 Compatibility

  • React Native >= 0.60.0
  • React >= 16.8.0
  • TypeScript support
  • iOS and Android support

🎨 Styling

  • Rounded corners (12px border radius)
  • Shadow effects for depth
  • Responsive width (100% with padding)
  • Smooth animations
  • Customizable colors and positioning

📄 License

MIT License - see LICENSE file for details.

👨‍💻 Author

Created by diyardev


Full documentation available in README.md