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

when using onDeviceUI it still tries to create websocket server #3271

Closed
Gongreg opened this issue Mar 23, 2018 · 5 comments
Closed

when using onDeviceUI it still tries to create websocket server #3271

Gongreg opened this issue Mar 23, 2018 · 5 comments

Comments

@Gongreg
Copy link
Member

Gongreg commented Mar 23, 2018

Even when you are using onDeviceUI storybook still tries to create websocket server.

Temporary workaround is to write these lines before rendering storybookUI:

const addons = require('@storybook/addons');
addons.setChannel({on: () => {}, emit: () => {}, removeListener: () => {}});

Proper solution would be to add option to skip websocket channel creation (maybe some people want to use both websockets and onDeviceUI at the same time, so we can't disable this functionality, we need to make it opt in).

This shouldn't be difficult to implement.

@danielduan
Copy link
Member

If we break the dependency here, we can enable static RN builds with Expo and pave the way for #3224 and #3235

@Gongreg
Copy link
Member Author

Gongreg commented Mar 24, 2018

@danielduan, yes. And then we will have all the options to also think how to evolve static build more, by including addons and so on :)

@Gongreg
Copy link
Member Author

Gongreg commented Mar 24, 2018

We should also think whether this should be default option or not. I don't know many RN Storybook users so I can't comment which one should be default behaviour (crashing or skipping websockets when using onDeviceUI). Logic suggests me second option. :D

@Gongreg
Copy link
Member Author

Gongreg commented Mar 24, 2018

@danielduan, lets bring the conversation to the PR.

@Gongreg
Copy link
Member Author

Gongreg commented Jun 21, 2018

This PR was merged into alpha: #3686 .

@Gongreg Gongreg closed this as completed Jun 21, 2018
@issue-sh issue-sh bot removed the todo label Jun 21, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants