storybookjs / frontpage

🌐 The website for storybook.js.org

Home Page:https://storybook.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Documentation] replace "It’s best practice to use propTypes in React"

cyrfer opened this issue · comments

Describe the issue

For newcomers to storybook, it is confusing to see

It’s best practice to use propTypes in React to specify the shape of data that a component expects.

I think the community moved to typescript interfaces for this some time ago.

Steps to reproduce the behavior

  1. Go to https://storybook.js.org/tutorials/intro-to-storybook/react/en/simple-component/

Expected behavior

I think people will expect something along the lines of,

It’s best practice to use [a typescript interface] in React to specify the shape of data that a component expects.

Additional context

I'm new to storybook, but I have the impression it is the industry standard. Typescript is also industry standard, so I hope to see these technologies play nicely together.

I'm actually struggling to setup storybook in a monorepo (very common in industry today) with typescript and multiple React applications sharing one component library. I want storybook to run in the package for the component library.

Yea, good point. We've already moved docs to TS by default. The tutorials are lagging behind a bit.

@cyrfer, thanks for following up with us on this and indeed, you're right 🙇 . The tutorials are not up-to-date with TypeScript. Hope you don't mind, but I'm going to close this one, and let's continue the discussion on the tutorial's repository issue here

Hope you have a great day.

Stay safe