diff --git a/app/src/examples/WorkletFactoryCrashExample.tsx b/app/src/examples/WorkletFactoryCrashExample.tsx new file mode 100644 index 00000000000..15633a28a64 --- /dev/null +++ b/app/src/examples/WorkletFactoryCrashExample.tsx @@ -0,0 +1,35 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import React from 'react'; +import { Button, StyleSheet, View, Text } from 'react-native'; + +export default function App() { + function handleOnPress() { + function badWorklet() { + 'worklet'; + // @ts-expect-error + unexistingVariable; + } + } + + return ( + + + Clicking the button below should give a RedBox with stack trace that + denotes the error in `badWorklet` function, pointing to + `unexistingVariable` usage. + +