Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ToggleStorybook vs react-native-camera #1826

Closed
maqeelqureshi opened this issue Nov 10, 2021 · 3 comments
Closed

ToggleStorybook vs react-native-camera #1826

maqeelqureshi opened this issue Nov 10, 2021 · 3 comments

Comments

@maqeelqureshi
Copy link

react-native-camera library doesn't work inside ToggleStorybook tag.

I am trying to use camera library. Camera component works fine in simple RN project but when I try to use the same in ignite project, it shows black screen.

Only if I remove the ToggleStorybook parent element in app.tsx than it works fine.

Any suggestion?

@jamonholmgren
Copy link
Member

We probably need to move the getStorybookUI function call into a function and only call it when storybook is activated.

const StorybookUI = getStorybookUI({
port: 9001,
host: "localhost",
onDeviceUI: true,
asyncStorage: require("@react-native-async-storage/async-storage").default || null,
})

According to @dannyhw from React Native Storybook, it polyfills some things which can be problematic and possibly causing this issue. (Potentially resolved in Storybook 6.x)

@dannyhw
Copy link
Contributor

dannyhw commented Nov 15, 2021

potentially related issue: storybookjs/react-native#20

infinitered-circleci pushed a commit that referenced this issue Mar 1, 2022
## [7.10.6](v7.10.5...v7.10.6) (2022-03-01)

### Bug Fixes

* **storybook:** Adds patch for storybook/addons to resolve promise bug ([#1906](#1906) by [@dannyhw](https://github.com/dannyhw)) ([0beee77](0beee77)), closes [#1860](#1860) [#1826](#1826) [#1769](#1769)
@dannyhw
Copy link
Contributor

dannyhw commented Mar 8, 2022

@maqeelqureshi it would be worth checking this on the latest version of ignite since the change in #1906 would probably fix this issue. You could also just apply the patch from that PR to your own project and that should also work

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

No branches or pull requests

3 participants