Skip to content

Pin @storybook/react-native peer dep and document internal API usage#81

Open
EmilioBejasa wants to merge 9 commits intomainfrom
fix/pin-storybook-peer-dep
Open

Pin @storybook/react-native peer dep and document internal API usage#81
EmilioBejasa wants to merge 9 commits intomainfrom
fix/pin-storybook-peer-dep

Conversation

@EmilioBejasa
Copy link
Copy Markdown
Collaborator

Summary

  • Narrows peerDependencies for @storybook/react-native from "*" to ">=10.0.0 <11.0.0"
  • Adds a comment in StoryRenderer.tsx explaining why we use internal View APIs (_storyIndex, _idToPrepared, _preview) and that there is currently no public alternative

Why

The View class in @storybook/react-native doesn't expose a public API for programmatic story rendering — every property we need is underscore-prefixed (internal). Accepting "*" as the peer dependency means a consumer on a future major version could install the package and get silent breakage. Pinning to ^10 prevents this and makes the constraint visible.

Test plan

  • Verify npm install warns correctly if a consumer has a different major version of Storybook

🤖 Generated with Claude Code

@EmilioBejasa EmilioBejasa requested a review from tdrhq March 18, 2026 20:00
Copy link
Copy Markdown
Contributor

@tdrhq tdrhq left a comment

Choose a reason for hiding this comment

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

Your job building this library will be to do if-else conditions to make sure it works for every React Native version. It's okay to set a minimum supported version.

You'll need some kind of test to ensure that it works for every version

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.

2 participants