storybookjs / addon-react-native-server

A replacement for @storybook/react-native-server which will enable multiple devices to sync over websockets
MIT License
6 stars 0 forks source link

How would we run this add-on along with Expo? #5

Open shuchenliu opened 1 month ago

shuchenliu commented 1 month ago

For Expo projects running Storybook we usually have configurations that look like this

// .story/main.ts
import { StorybookConfig } from "@storybook/react-native";

const main: StorybookConfig = {
  stories: ["./stories/**/*.stories.?(ts|tsx|js|jsx)"],
  addons: [
    "@storybook/addon-ondevice-controls",
    "@storybook/addon-ondevice-actions",
  ],
};

And it seems that this add-on (addon-react-native-server) cannot be registered here as it's not an add-on designated for React Native platform. Could you please provide some direction for how we can utilize this add-on with Expo?

dannyhw commented 1 month ago

The server runs on the web storybook so you add it in alongside addon react native web. if you wanted to run it separately from the web storybook I could make another package for that. However right now its just built to replicate the server functionality that we had with the old verison.