This repository was archived by the owner on May 4, 2026. It is now read-only.
Repository navigation
π Major Changes
- Complete rewrite of the modal system for better stability and type safety
- Introduced new modal types: Simple, Styled, and Full Screen
- Improved TypeScript support with better type definitions
- New singleton pattern for
ModalControllerensuring consistent modal state
β¨ New Features
-
Full Screen Modal Support
- Added
isFullScreenprop for edge-to-edge modals - Proper handling of status bar and device safe areas
- Background color customization through
containerStyle
- Added
-
Enhanced Modal Types
- Simple Modal: Basic modal with minimal styling
- Styled Modal: Pre-styled modal with animations
- Full Screen Modal: Edge-to-edge modal support
-
Improved Animation System
- Smoother transitions between states
- Customizable animation types per modal
- Better handling of modal mounting/unmounting
πͺ Improvements
- Better ref handling with
useImperativeHandle - Improved state management using
useStateWithCallback - Enhanced backdrop handling and touch events
- Better support for custom styling through
containerStyle - More consistent modal positioning and layout
π Breaking Changes
- Changed modal ref handling system
- Updated modal show/hide method signatures
- Removed deprecated styling props in favor of
containerStyle - Changed default animation behavior
- Updated TypeScript definitions for stricter type checking
π Documentation
- Completely revamped documentation with detailed examples
- Added comprehensive usage guide
- Included best practices section
- Added performance optimization tips
- More code examples and use cases
π Bug Fixes
- Fixed modal flickering issues
- Resolved background color inconsistencies
- Fixed full-screen modal layout issues
- Improved handling of modal state transitions
- Better error handling for modal operations
π§Ή Maintenance
- Updated dependencies to latest versions
- Improved code organization
- Better TypeScript integration
- Enhanced error messages and debugging
- Removed deprecated code and methods
π± Example App
- New example app showcasing all modal types
- Added more usage examples
- Improved demo animations
- Better code organization in examples
π Migration Guide
To upgrade from 1.x to 2.0.0:
- Update your imports:
import GlobalModal, { ModalController } from "react-native-global-modal-2"- Update modal ref setup:
const modalRef = useRef<GlobalModalRef>(null);
React.useEffect(() => {
if (modalRef.current) {
ModalController.setModalRef(modalRef);
}
}, []);- Update modal show calls:
// Old
modal.show(<Content />);
// New
ModalController.show({
content: <Content />,
// optional props
isFullScreen: false,
containerStyle: {},
onShow: () => {},
onHide: () => {},
});Full Changelog: 1.3.0...2.0.0