You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Web: importing StreamdownText crashes at module load (createWorkletRuntime called at module scope) #27
react-native-worklets' web build implements the runtime API family (createWorkletRuntime, scheduleOnRuntime, ...) as deliberately throwing stubs, and react-native-streamdown ships no web fork of its own to avoid them. So on react-native-web, the first import of StreamdownText throws at module load and takes the whole app down before anything renders.
Reproduction
Expo (or any react-native-web) app, web target:
import{StreamdownText}from'react-native-streamdown';// rendering <StreamdownText markdown="hi" /> never gets a chance —// the import itself throws: createWorkletRuntime is not available on web
This took down chat in our production web app (the same JS bundle serves iOS, Android and web via Expo Router).
Suggested fix
Guard the runtime behind Platform.OS === 'web' and run remend on the JS thread there, delivering the result through scheduleOnRN (whose web implementation is a microtask) so both platforms use the same delivery primitive. remend is pure JS. Native behavior stays untouched.
We are running exactly this as a patch in production and it works: streaming repair renders fine on web. PR incoming.
Activity