Skip to content

fix: update default value for enableWebsockets in View component#890

Merged
ndelangen merged 4 commits into
nextfrom
norbert/auto-detect-websocketenabled
May 12, 2026
Merged

fix: update default value for enableWebsockets in View component#890
ndelangen merged 4 commits into
nextfrom
norbert/auto-detect-websocketenabled

Conversation

@ndelangen
Copy link
Copy Markdown
Member

@ndelangen ndelangen commented May 11, 2026

What I did

I made the enableWebsockets option auto-enable, based on the generated config runtime.

How to test

Provide environment variables for websockets, but don't explicitly setup enableWebsockets inside of .rnstorybook/index.tsx.

The expected outcome is that the storybook connects to the given websocket address.

Copilot AI review requested due to automatic review settings May 11, 2026 15:32
@ndelangen ndelangen requested a review from dannyhw as a code owner May 11, 2026 15:32
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 11, 2026

🦋 Changeset detected

Latest commit: 32e628e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@storybook/react-native Patch
@storybook/react-native-ui Patch
@storybook/react-native-ui-lite Patch
@storybook/react-native-ui-common Patch
@storybook/react-native-theming Patch
@storybook/addon-ondevice-actions Patch
@storybook/addon-ondevice-backgrounds Patch
@storybook/addon-ondevice-controls Patch
@storybook/addon-ondevice-notes Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the React Native Storybook View.getStorybookUI defaults so WebSocket support is enabled automatically when a WebSocket configuration is injected via globalThis.STORYBOOK_WEBSOCKET (e.g., from generated storybook.requires).

Changes:

  • Change enableWebsockets default from false to Boolean(globalThis.STORYBOOK_WEBSOCKET) in View.getStorybookUI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/react-native/src/View.tsx
@dannyhw
Copy link
Copy Markdown
Member

dannyhw commented May 11, 2026

Can you add the changeset?

@ndelangen ndelangen merged commit 511bca0 into next May 12, 2026
1 check passed
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.

4 participants