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

Why does React Native project need react-dom? #5156

Closed
MrOggy85 opened this issue Jan 7, 2019 · 3 comments
Closed

Why does React Native project need react-dom? #5156

MrOggy85 opened this issue Jan 7, 2019 · 3 comments

Comments

@MrOggy85
Copy link

MrOggy85 commented Jan 7, 2019

Why does @storybook/react-native require react-dom as a peerDependency? As far as I know it is not needed and also not used with running with React Native?

  • @storybook/react-native 4.1.1
  • react-native 0.55.4

I get the following warnings when running yarn install

warning "@storybook/react-native > @storybook/[email protected]" has unmet peer dependency "react-dom@>=16.3.0".
warning "@storybook/react-native > @storybook/[email protected]" has unmet peer dependency "react-dom@*".
warning "@storybook/react-native > @storybook/ui > [email protected]" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16".
warning "@storybook/react-native > @storybook/ui > [email protected]" has unmet peer dependency "react-dom@^15.5.4 || ^16.0.0".
warning "@storybook/react-native > @storybook/ui > react-treebeard > [email protected]" has unmet peer dependency "react-dom@^15.3.0 || ^16.0.0".
warning "@storybook/react-native > @storybook/ui > react-treebeard > velocity-react > [email protected]" has unmet peer dependency "react-dom@>=15.0.0".

According to these issues react-dom will also be installed by default when starting a storybook project
#1112 - [3.0.0] Using React Native storybooks does not add react-dom
#1099 - Running getstorybook should add react-dom as a peer dependency for React Native projects

@Gongreg
Copy link
Member

Gongreg commented Jan 9, 2019

Hey, @MrOggy85, starting from v5 it won't need it. It is necessary so we could run web part of storybook. But the web part from v5 is going to be opt in.

I am closing this issue, since we are aware of it. :)

@Gongreg Gongreg closed this as completed Jan 9, 2019
@benmneb
Copy link

benmneb commented Jan 30, 2024

Hey @Gongreg, storybook 6.5 still errors without react-dom (referenced in node_modules/@storybook/preview-web/dist/modern/renderDocs.js) in bare react native. Did this actually get changed? Any docs?

@Gongreg
Copy link
Member

Gongreg commented Jan 30, 2024

Hey @benmneb , I haven't worked on rn storybook in a really long time. I think you should take a look at https://github.com/storybookjs/react-native and if necessary open the issue there.

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