Update deprecated Firebase API for RN Firebase v22 #62
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openrn/react-native-logging-tools#62
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Checklist
Feature Description
Following update to React Native Firebase v22, the current namespaced API used in the project is considered deprecated, provoking a lot of warnings that pollutes logs journal. The modular API approach should be used from now on.
Problem Statement
The warnings coming from Firebase to warn that all namespaced API are deprecated and will be removed in the next major release pollutes logs journal.
Proposed Solution
Following the official documentation (https://rnfirebase.io/migrating-to-v22), the solution would be to switch to the modular API, where
logEventis imported as a standalone function instead of calling it through theanalyticsinstance.This means that the
createFirebaseLoggersignature needs to be updated to follow this solution.This update should not any impact on the current behavior of Firebase logger, though it would bring a breaking change for future releases.
Use Case
If a react native application using this library try to upgrade their Firebase dependency to the next major version, the Firebase logger implemented in this library could break.
Alternatives Considered
An alternative could be to prevent this library to allow users to upgrade to the next RN Firebase major update, but that would means renouncing the security fixes and new features brought along the update.
Examples
Here is an example on how a Firebase logger would be initialized in an application using the updated library.
Implementation Ideas
Updating the
createFirebaseLoggerto the following would do the trick :Additional Context
None