-
Notifications
You must be signed in to change notification settings - Fork 11
docs: update react native sdk docs with the latest changes #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
WalkthroughReact Native documentation is restructured across installation and usage guides. The installation docs introduce new Prerequisites and Examples sections, expand Expo workflow with tabbed layouts and warnings, reorganize Android/iOS setup paths, and add Advanced iOS Setup details. The usage guide standardizes section headings and adds parameter definitions, override APIs, and troubleshooting guidance. No code logic or public signatures modified. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (5)
content/docs/react-native/usage.mdx (3)
36-84: Comprehensive parameter documentation, but verify API accuracy.The parameter documentation is thorough and well-structured. However, at line 82, the code example uses
ReclaimVerification.ProviderVersion.resolved('1.0.0'), which should be verified against the actual SDK implementation to ensure this static method signature exists and is the correct way to specify provider versions.If this API differs from the actual SDK, clarify the correct usage pattern with an inline comment or link to SDK documentation.
86-111: Adequate alternative method documentation, but lacks context on when to use each approach.The two alternative verification methods are documented but without guidance on use cases. Consider adding brief explanations:
- When should
startVerificationFromUrlbe preferred over directstartVerification?- What format should the JSON template follow?
This would help developers choose the right approach for their needs.
161-195: Advanced APIs documented, but setVerificationOptions needs more detail, and external link requires verification.The
setOverrides()andclearAllOverrides()methods are clear, butsetVerificationOptions()at lines 192–195 lacks parameter documentation or examples. Additionally, verify that the external link at line 177 (https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/documentation/overrides.md) is accessible and current.Add parameter documentation or an example for
setVerificationOptions()to guide developers on what options are available and how to use them.content/docs/react-native/installation.mdx (2)
153-178: iOS setup clear, but performance fix duplicates earlier Expo section.The iOS setup is straightforward. However, the GODEBUG performance fix at lines 170–178 duplicates the earlier Expo section (lines 85–93). Consider linking or consolidating this guidance to reduce maintenance burden and improve user experience.
Consider using a cross-reference: "See the iOS Performance Fix section above" instead of repeating the full instructions.
180-206: Advanced iOS setup with clear alternatives, but version constraint needs verification.The accordion-organized advanced setup provides three installation methods (CocoaPods recommended, Git Tag, Git HEAD). Verify:
- The pod version constraint at line 189:
~> 0.18.0— confirm this is a stable, current version- The Git URLs at lines 194 and 199 point to the correct repository and remain accessible
- Whether this advanced override section is still necessary or if recent SDK versions have resolved dependency conflicts
Consider adding a note explaining when developers should use this override (e.g., "Use this only if automatic dependency resolution fails").
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
content/docs/react-native/installation.mdx(3 hunks)content/docs/react-native/usage.mdx(2 hunks)
🔇 Additional comments (9)
content/docs/react-native/usage.mdx (4)
1-32: Clear and well-organized basic setup flow.The restructured section provides a logical step-by-step initialization path. However, verify that the config object pattern with optional chaining (
config.REACT_APP_RECLAIM_APP_ID ?? '') accurately reflects how developers should handle credentials—ensure this doesn't mask missing configuration issues that should fail loudly rather than silently defaulting to empty strings.
113-159: Thorough exception handling with realistic example.The exception handling section is well-structured with clear case statements and proper error detail access. Verify that all documented exception types (
ExceptionType.Cancelled,Dismissed,SessionExpired,Failed) and error properties (sessionId,reason,innerError) match the actual SDK implementation.
197-229: Practical troubleshooting guidance with good platform separation, but version specificity needs verification.The troubleshooting section provides actionable solutions for known issues. However, verify that the specific dependency versions are still current and necessary:
- Cronet version
119.6045.31at line 206- Minimum SDK version
0.7.3at line 225 for build fixesConsider adding a note about when these versions were tested and recommending developers check the SDK changelog for version-specific guidance.
231-246: Comprehensive migration guide coverage with helpful changelog reminder.The migration section provides links for all major versions. Verify that all the migration guide links at lines 235–242 are accessible, particularly for older versions (0.6.0–0.8.3) which may have moved or been consolidated.
content/docs/react-native/installation.mdx (5)
16-31: Well-structured prerequisites with practical examples, but external links need verification.The prerequisites section clearly identifies required setup steps with a helpful fallback link to the Get API Key guide. The examples provide directly relevant sample code. Verify that all external links are accessible:
- Reclaim Devtools at line 22:
https://dev.reclaimprotocol.org/explore- GitHub sample repos at lines 29–30
- Relative link
/api-keyis resolved correctly in the docs site
34-57: Clear Expo setup with appropriate warnings about Expo Go limitations.The warning callout at lines 55–57 effectively communicates the native code limitation and development build requirement. Verify that the config plugin name
@reclaimprotocol/inapp-rn-sdkat line 49 is accurate for current versions and that the warning still applies to the latest Expo versions.
59-83: Tabbed build instructions provide clear platform paths.The tabbed layout effectively separates EAS and non-EAS build paths. Verify that the commands match current Expo CLI conventions and that
npx eas-cliis still the recommended entry point (line 77–80) for latest versions.
85-93: Clear iOS performance troubleshooting steps.The GODEBUG environment variable configuration is clearly documented with step-by-step guidance. Verify that this workaround is still necessary for current SDK versions and that
asyncpreemptoff=1is the correct and complete fix for iOS performance issues on physical devices.
111-151: Android setup instructions are detailed, but repository URLs and class names need verification.The Android setup covers both manifest configuration and repository setup clearly. However, verify:
- The activity class name at line 119:
org.reclaimprotocol.inapp_sdk.ReclaimActivity- The AWS S3 repository URL at line 135:
https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/repo- Whether the fallback suggestion at line 150 to add repositories to root
build.gradleremains valid for current Android/Gradle versions
Description
Testing (ignore for documentation update)
Type of change
Checklist:
Additional Notes:
Summary by CodeRabbit