Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/slick-ants-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@storybook/react-native': patch
---

auto-detect websocket enabling
4 changes: 2 additions & 2 deletions packages/react-native/src/View.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export type Params = {
hasStoryWrapper?: boolean;
/**
* Enable websockets for the storybook server to remotely control the storybook
* default: false
* default: automatically enabled when a websocket config is injected via storybook.requires (i.e. when STORYBOOK_WS_HOST is set), otherwise false
*/
enableWebsockets?: boolean;
query?: string;
Expand Down Expand Up @@ -264,7 +264,7 @@ export class View {

getStorybookUI = (params: Partial<Params> = {}) => {
const {
enableWebsockets = false,
enableWebsockets = !!globalThis.STORYBOOK_WEBSOCKET,
CustomUIComponent,
hasStoryWrapper: storyViewWrapper = true,
Comment thread
ndelangen marked this conversation as resolved.
} = params;
Expand Down
Loading