Purpose of Core Module
The primary purpose of @bagisto-native/core is to establish a standardized communication protocol (Bridge) between the Web View and the Native Shell.
Responsibilities
- Transport Layer: It manages the
postMessage(Android) andwebkit.messageHandlers(iOS) channels. - State Synchronization: It keeps the native navigation stack in sync with the web's URL.
- Hardware Access: It provides a unified API to trigger hardware features like Haptic Feedback and location services.
- UI Coordination: It coordinates native UI elements (like the Navigation Bar title and buttons) based on the web page's content.
Next Steps
- Understand What Problems It Solves
- Explore Web Components
- Learn about Utility Functions
