SB9: re-export renderer types
In Storybook 9, We are re-exporting types from the renderers in the frameworks.
So in .rnstorybook/preview.tsx:
import type { Preview } from '@storybook/react';
Becomes:
import type { Preview } from '@storybook/react-native';
In addition to re-exporting the types, we should also make sure that auto-migration correctly transforms Storybook 8 projects on upgrade.
Similar things need to happen in all the story files:
// button.stories.tsx
import type { Meta, StoryObj } from "@storybook/react";
This is somewhat problematic in React Native, where stories can be shared between React Native and React Native Web. As a workaround, we can probably use the renderer types to start with. But long-term, we should figure out a better solution.
@shilman is there a type that we can re-export for this or do we need to redefine the types?
Sorry for the slow response. I think we can just re-export unmodified. You can look at the other frameworks to see what e.g. Next does.