The recent development off branch b3.5.2 has brought significant technical enhancements and modernizations to the Open Mushaf Native codebase. These changes focus on improving performance, maintainability, and leveraging the latest advancements in the React Native ecosystem.
Here's a breakdown of the notable technical shifts:
Core Stack & Dependency Upgrades
- Expo SDK 53 Migration: The project was upgraded to Expo SDK 53 . This is a crucial update, bringing in the latest features, bug fixes, and performance improvements from the Expo platform, ensuring the app stays current with the rapidly evolving React Native landscape.
- State Management Overhaul: Recoil to Jotai: A significant change was the migration from Recoil to Jotai for global state management. This move was prompted by Recoil reaching its end of support. Jotai offers a more minimalistic and flexible approach to atomic state management in React.
- Audio Playback Modernization: expo-av has been replaced with expo-audio due to the former's end of support. This ensures continued compatibility and access to the latest audio playback capabilities within Expo.
- UI Component Refresh: Slider: The @react-native-community/slider has been swapped out for react-native-awesome-slider , offering better customization, performance, or modern features for slider components.
- Dependency Updates:
- @gorhom/bottom-sheet was updated, bringing in the latest improvements to this popular bottom sheet component.
- react-native-safe-area-context was also updated, ensuring correct handling of safe areas across various devices and OS versions.
Enhanced Storage & Build Optimizations
- High-Performance Storage with MMKV: A key technical improvement is the migration from @react-native-async-storage/async-storage to react-native-mmkv . MMKV is known for its significantly faster performance for key-value storage, which can lead to a snappier user experience, especially for frequently accessed data.
- Codebase Clean-up: Multiple unused packages were removed. This helps in reducing the app's bundle size and build times, and simplifies dependency management.
- Build Stability: The metro.config.js was updated to fix a build error that emerged from the b3.5.0 changes, ensuring a smoother development and build pipeline.
Service Worker Refinements
- Service Worker Fixes: Minor UI and logic fixes were implemented in the service worker, which is crucial for web-based PWA functionality and offline capabilities.
- Improved UI notifications to display various stages of PWA installation, updates, and errors.
- Add offline page to show when ever the app goes offline.
Summary of Key Technical Shifts:
- Modernized Core: Upgrading to Expo SDK 53.
- New State Management: Adopting Jotai for a more contemporary state solution.
- Performance-Oriented Storage: Leveraging react-native-mmkv for faster data access.