docs(Analytics): Adding examples for v23#8970
docs(Analytics): Adding examples for v23#8970Bilal-Abdeen wants to merge 6 commits intoinvertase:mainfrom
Conversation
|
@Bilal-Abdeen is attempting to deploy a commit to the Invertase Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation to include code examples for the modular API introduced in React Native Firebase version 22. The review feedback identifies a syntax error in the logEvent example and incorrect API usage for setting log levels, providing suggestions to ensure consistency with the modular API.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
You have used all of your free Bugbot PR reviews. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
mikehardy
left a comment
There was a problem hiding this comment.
Hmm let me think on this one - I appreciate the PR and we definitely can use all the help we can get keeping documentation up to date, but I don't like the cognitive load implied by a big bunch of conditionals "if RNFB < this version" etc
I think I'd prefer to just update them all to the modular APIs, and have one note at the top indicating that the examples all use the modular APIs vs the deprecated namespaced ones since those are slated for removal shortly.
Bilal-Abdeen
left a comment
There was a problem hiding this comment.
Removed old examples (before v22)
Description
Related issues
Release Summary
Checklist
AndroidiOSOther(macOS, web)e2etests added or updated inpackages/\*\*/e2ejesttests added or updated inpackages/\*\*/__tests__Test Plan
Think
react-native-firebaseis great? Please consider supporting the project with any of the below:React Native FirebaseandInvertaseon TwitterNote
Low Risk
Low risk documentation-only change that updates code samples for the newer v22+ modular Analytics API. Risk is limited to potential user confusion if examples are incorrect or inconsistent with the actual SDK.
Overview
Updates
docs/analytics/usage/index.mdto split multiple snippets into version-specific examples:<= v21using instance methods (e.g.,analytics().logEvent) and>= v22using the modular API (e.g.,getAnalytics()+logEvent(analytics, ...)).Also adjusts related examples for
logSelectContent,getAppInstanceId,setAnalyticsCollectionEnabled,setConsent, and replaces the Other/Web debug guidance for v22+ withsetLogLevel('debug'|'verbose')instead ofglobalThis.RNFBDebug.Reviewed by Cursor Bugbot for commit 60907b1. Bugbot is set up for automated code reviews on this repo. Configure here.