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

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

Closed
cyrfer opened this issue Apr 21, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@cyrfer
Copy link

cyrfer commented Apr 21, 2023

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.

@cyrfer cyrfer added the bug Something isn't working label Apr 21, 2023
@winkerVSbecks
Copy link
Contributor

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

@jonniebigodes
Copy link
Contributor

jonniebigodes commented May 10, 2023

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants