Skip to content

SB9: re-export renderer types #718

@shilman

Description

@shilman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions