Repository navigation
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