Skip to content

fix: make @react-navigation/native an optional peer dependency#854

Closed
davidtruong wants to merge 1 commit intomasterfrom
claude/fix-rn-sdk-770-lpqsN
Closed

fix: make @react-navigation/native an optional peer dependency#854
davidtruong wants to merge 1 commit intomasterfrom
claude/fix-rn-sdk-770-lpqsN

Conversation

@davidtruong
Copy link
Copy Markdown

Users who do not use the IterableInbox component (or who use a different navigation library) should not be forced to install @react-navigation/native.

  • Mark @react-navigation/native, react-native-safe-area-context, and react-native-webview as optional in peerDependenciesMeta
  • Create a safe useIsFocused hook wrapper that gracefully falls back to returning true when @react-navigation/native is not installed
  • Update IterableInbox to use the wrapper instead of importing directly

Closes #770

https://claude.ai/code/session_01SsKoAbA48hJk6cDmbrRGqc

🔹 JIRA Ticket(s) if any

✏️ Description

Please provide a brief description of what this pull request does.

Users who do not use the IterableInbox component (or who use a different
navigation library) should not be forced to install @react-navigation/native.

- Mark @react-navigation/native, react-native-safe-area-context, and
  react-native-webview as optional in peerDependenciesMeta
- Create a safe useIsFocused hook wrapper that gracefully falls back to
  returning true when @react-navigation/native is not installed
- Update IterableInbox to use the wrapper instead of importing directly

Closes #770

https://claude.ai/code/session_01SsKoAbA48hJk6cDmbrRGqc
@qltysh
Copy link
Copy Markdown

qltysh bot commented Apr 7, 2026

❌ 1 blocking issue (1 total)

Tool Category Rule Count
eslint Lint React Hook "useIsFocusedFromNav" is called conditionally. React Hooks must be called in the exact same order in every component render. Did you accidentally call a React Hook after an early return? 1

*/
export function useIsFocused(): boolean {
if (useIsFocusedFromNav) {
return useIsFocusedFromNav();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React Hook "useIsFocusedFromNav" is called conditionally. React Hooks must be called in the exact same order in every component render. Did you accidentally call a React Hook after an early return? [eslint:react-hooks/rules-of-hooks]

@davidtruong
Copy link
Copy Markdown
Author

Things are fixed

@davidtruong davidtruong closed this Apr 8, 2026
@davidtruong davidtruong deleted the claude/fix-rn-sdk-770-lpqsN branch April 8, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implicit dependency on @react-navigation/native

2 participants