REACT vs REACT_PROJECT vs WEBPACK for storybook type?

Viewed 792

I'm installing Storybook in my JS+React repo. It said it was unable to detect my project type and asked me to manually choose between several. Among the options were REACT, REACT_PROJECT, and WEBPACK.

I can find no documentation explaining the difference between the first two, and I'm also unsure what's meant by WEBPACK since of course many projects use both React and Webpack as they serve entirely different functions (as opposed to React vs Angular, which you are less likely to find side by side.)

So how do you choose among these for a project that uses both React and Webpack?

1 Answers

sometime it happens Storybook wont detect you are using REACT.

you simply have to tell you are using React or force it to Use React

Try this.

npx -p @storybook/cli sb init --type react

or

npx -p @storybook/cli sb init --type react_scripts

This will work.

Related