-
-
Notifications
You must be signed in to change notification settings - Fork 177
Open
Description
Describe the bug
According to the docs, the stories are sorted in export order, at least that is what I understand:

But in my case they are not. Here is my stories file:
import type { Meta, StoryObj } from "@storybook/react";
import { fn } from "storybook/test";
import { View } from "react-native";
import { MyButton } from "./Button";
const meta = {
title: "MyButton",
component: MyButton,
args: {
text: "Hello world",
},
decorators: [
(Story) => (
<View style={{ padding: 16 }}>
<Story />
</View>
),
],
} satisfies Meta<typeof MyButton>;
export default meta;
type Story = StoryObj<typeof meta>;
export const C: Story = {
args: {
onPress: fn(),
},
};
export const B: Story = {
args: {
onPress: fn(),
},
};
export const A: Story = {
args: {
onPress: fn(),
},
};
here is how they are represented:

To Reproduce
Steps to reproduce the behavior:
- Start new project from template
npx create-expo-app --template expo-template-storybook AwesomeStorybook
- Remove current Default story and add three stories in the order C, B, A as shown above
- Open app and notice how they are sorted alphabetically and not as exported
Expected behavior
I expect the stories to be sorted in export order
Screenshots
Provided above
Code snippets
Provided above
System:
Please paste the results of npx storybook@latest info
here.
Storybook Environment Info:
System:
OS: macOS 15.6
CPU: (14) arm64 Apple M3 Max
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v22.14.0/bin/yarn
npm: 10.9.2 - ~/.nvm/versions/node/v22.14.0/bin/npm <----- active
pnpm: 9.1.1 - ~/.nvm/versions/node/v22.14.0/bin/pnpm
Browsers:
Chrome: 138.0.7204.184
Safari: 18.6
npmPackages:
@storybook/addon-docs: ^9 => 9.1.1
@storybook/addon-ondevice-actions: ^9 => 9.1.0
@storybook/addon-ondevice-backgrounds: ^9 => 9.1.0
@storybook/addon-ondevice-controls: ^9 => 9.1.0
@storybook/addon-ondevice-notes: ^9 => 9.1.0
@storybook/react: ^9 => 9.1.1
@storybook/react-native: ^9 => 9.1.0
@storybook/react-native-web-vite: ^9 => 9.1.1
storybook: ^9 => 9.1.1
Metadata
Metadata
Assignees
Labels
No labels