Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When upgrading to React 19, I had a few typing errors, mainly because we're not consistent when writing stories.
This changes to always use the following pattern:
This has the main benefit of making sure that the story is typed correctly:
Story
asStoryObj<typeof meta>
makes sure that if we have mandatory args defined in the meta, we don't have to define them in the storyIt also tries to use
decorators
and thechildren
arg as much as possible instead of defining story-specific render functions