Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

using disableWebsockets instead of useWebsockets #3686

Merged
merged 2 commits into from
May 31, 2018
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
22 changes: 22 additions & 0 deletions app/react-native/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,28 @@ The following parameters can be passed to the start command:
Override the root(s) to be used by the packager
```

## getStorybookUI Options

You can pass these parameters to getStorybookUI call in your storybook entry point:

```
{
onDeviceUI: Boolean (false)
-- display stories list on the device
disableWebsockets: Boolean (false)
-- allows to display stories without running storybook server. Should be used with onDeviceUI
secured: Boolean (false)
-- use wss/https instead of ws/http
host: String (NativeModules.SourceCode.scriptURL)
-- host to use
port: Number (7007)
-- port to use
query: String ("")
-- additional query string to pass to websockets
}
```


## Learn More

Check the `docs` directory in this repo for more advanced setup guides and other info.
2 changes: 1 addition & 1 deletion app/react-native/src/preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class Preview {
}

if (!channel || params.resetStorybook) {
if (params.onDeviceUI && !params.useWebsockets) {
if (params.onDeviceUI && params.disableWebsockets) {
channel = new EventEmitter();
} else {
const host = params.host || parse(NativeModules.SourceCode.scriptURL).hostname;
Expand Down