rememberBoomerangStore
Android-specific implementation of rememberBoomerangStore.
This implementation uses rememberSaveable with a custom Saver to preserve the BoomerangStore's state across configuration changes.
The Saver converts the BoomerangStore's state to an Android Bundle for saving and restores it by creating a new BoomerangStore instance and applying the saved state.
Return
The remembered BoomerangStore instance that persists across configuration changes
Parameters
The type of BoomerangStore to remember
A lambda that creates an initial instance of the BoomerangStore
Remembers a BoomerangStore across recompositions and configuration changes. This function is implemented differently on each platform to ensure proper state saving and restoration.
On Android, it uses rememberSaveable with a custom saver to preserve the store's state across configuration changes. On other platforms, it uses remember to keep the store instance across recompositions.
Return
The remembered BoomerangStore instance
Parameters
The type of BoomerangStore to remember
A lambda that creates an initial instance of the BoomerangStore
Desktop-specific implementation of rememberBoomerangStore.
This implementation uses the standard remember function to keep the BoomerangStore instance across recompositions. On desktop platforms, there are no configuration changes like on Android, so we don't need the more complex state saving mechanism.
Return
The remembered BoomerangStore instance
Parameters
The type of BoomerangStore to remember
A lambda that creates an initial instance of the BoomerangStore
iOS-specific implementation of rememberBoomerangStore.
This implementation uses the standard remember function to keep the BoomerangStore instance across recompositions. On iOS, the app process typically doesn't undergo configuration changes like on Android, so we don't need the more complex state saving mechanism.
Return
The remembered BoomerangStore instance
Parameters
The type of BoomerangStore to remember
A lambda that creates an initial instance of the BoomerangStore