Skip to content

Add a small Expo-specific setup section to the README #2

@eliotgevers

Description

@eliotgevers

Hi, thanks for publishing react-native-streamdown.

I think the setup docs could use a small Expo-specific section. The current examples are easy to follow, but they are written from a React Native Community app perspective, while Expo projects usually need slightly different setup for both Metro and Babel.

For Expo apps:

  1. Metro usually starts from expo/metro-config, not @react-native/metro-config
  2. react-native-worklets already exposes an Expo-specific helper for Bundle Mode via getBundleModeMetroConfig(config)
  3. Expo apps often do not start with a babel.config.js, but once one is added for the Worklets plugin, it still needs to preserve Expo’s default preset:
module.exports = function (api) {
  api.cache(true);

  return {
    presets: ["babel-preset-expo"],
    plugins: [
      [
        "react-native-worklets/plugin",
        {
          bundleMode: true,
          workletizableModules: ["remend"],
        },
      ],
    ],
  };
};

And for Metro, an Expo example would look more like:

const { getDefaultConfig } = require("expo/metro-config");
const { getBundleModeMetroConfig } = require("react-native-worklets/bundleMode");

let config = getDefaultConfig(__dirname);

module.exports = getBundleModeMetroConfig(config);

In monorepos, people may still need to add the .worklets watch folder, but this gets the setup much closer to the correct Expo shape.

That would make first-time setup smoother for Expo users without changing the main docs much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions