docs: replace missing utils export with getUtils and FilePath in examples - #9306
docs: replace missing utils export with getUtils and FilePath in examples#9306toyeshhm wants to merge 2 commits into
Conversation
…ples docs/app/utils.mdx and docs/storage/usage/index.mdx import `utils` from `@react-native-firebase/app`, but the package has no runtime export by that name. packages/app/lib/index.ts re-exports ./modular, which exposes getUtils(app?) and the FilePath constant; `Utils` is a type-only export. The samples now use those, matching the v26 migration guide. Also fixes two typos: "emojii" in the bug report template and "fom" in the messaging usage doc.
|
|
There was a problem hiding this comment.
🟢 Approval recommended
Changes are limited to documentation/template fixes and align the examples with the verified runtime exports (FilePath, getUtils) in packages/app/lib/index.ts.
Pull request overview
Fixes broken documentation examples that previously imported a non-existent runtime utils export from @react-native-firebase/app, updating them to use the actual modular exports (getUtils() and FilePath) so copy/paste works at runtime.
Changes:
- Update Storage and App utils documentation to use
FilePathandgetUtils()instead ofutils. - Fix small typos in Messaging docs and the bug report issue template.
File summaries
| File | Description |
|---|---|
| docs/storage/usage/index.mdx | Updates Storage putFile example to use FilePath instead of utils.FilePath. |
| docs/messaging/usage/index.mdx | Fixes typo in unsubscribe log message (“fom” → “from”). |
| docs/app/utils.mdx | Replaces utils usage with FilePath / getUtils() in examples to match actual runtime exports. |
| .github/ISSUE_TEMPLATE/Bug_report.md | Fixes typo in template comment (“emojii” → “emoji”). |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| import { View, Button } from 'react-native'; | ||
|
|
||
| import { utils } from '@react-native-firebase/app'; | ||
| import { FilePath } from '@react-native-firebase/app'; |
docs/app/utils.mdxanddocs/storage/usage/index.mdximportutilsfrom@react-native-firebase/app, but the package has no runtime export by that name:packages/app/lib/index.tsre-exports./modular, which exposesgetUtils(app?)and theFilePathconstant (Utilsis a type-only export). Copying those samples fails at runtime. They now usegetUtils()andFilePath, matching the v26 migration guide.Also fixes two typos:
emojiiin the bug report template andfomin the messaging usage doc.🔥