Skip to content

Make @react-navigation/native an optional dependency#845

Closed
franco-zalamena-iterable wants to merge 1 commit intoIterable:masterfrom
franco-zalamena-iterable:fix/770-remove-react-navigation-dependency
Closed

Make @react-navigation/native an optional dependency#845
franco-zalamena-iterable wants to merge 1 commit intoIterable:masterfrom
franco-zalamena-iterable:fix/770-remove-react-navigation-dependency

Conversation

@franco-zalamena-iterable
Copy link
Copy Markdown

@franco-zalamena-iterable franco-zalamena-iterable commented Apr 7, 2026

Summary

  • Make @react-navigation/native optional instead of implicit hard dependency
  • Fallback to always-focused behavior when react-navigation is not installed

Test plan

  • Build without @react-navigation/native installed
  • Inbox works with @react-navigation/native installed
  • Non-inbox features work without react-navigation

🤖 Generated with Claude Code

The SDK imported useIsFocused directly from @react-navigation/native,
making it a hard dependency even for users who don't use the inbox
feature or use a different navigation library. This wraps the import
in a try/catch with a fallback to always-focused behavior, and marks
the peer dependency as optional.

Fixes Iterable#770

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@franco-zalamena-iterable franco-zalamena-iterable deleted the fix/770-remove-react-navigation-dependency branch April 8, 2026 14:49
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.

1 participant