-
Notifications
You must be signed in to change notification settings - Fork 437
Description
This issue was converted from the documentation repository with the following context:
Hi Storybook team,
In the “Intro to Storybook” React tutorial, there’s a line that says:
“Now, an error in development will appear if the Task component is misused.”
This comes right after moving TaskData into src/types.ts. The statement is true in general (TypeScript will raise errors if the component is misused), but the timing of the comment makes it sound like the refactor itself enabled those errors. In reality, the errors were already present when the type was defined inline — the move just centralizes the type.
A small rewording could avoid confusion, e.g.:
“Because the Task component’s props are typed, TypeScript will show an error in development if the component is misused. Moving the type into src/types.ts simply keeps the code organized.”
Thanks for the great tutorial — this tweak would make it even clearer for readers.