Skip to content

Commit aff5a39

Browse files
fix: Replace old link to worklet error "Tried to synchrounously call a non worklet function..." (#8319)
## Summary Replace old link to worklet error`Tried to synchrounously call a non worklet function...`. ## Test plan
1 parent f312abe commit aff5a39

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

apps/common-app/src/apps/reanimated/examples/RuntimeTests/tests/advancedAPI/useFrameCallback.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('Test *****useFrameCallback*****', () => {
6464
await render(<InvalidFrameCallback />);
6565
await wait(200);
6666
}).toThrow(
67-
'[Worklets] Tried to synchronously call a non-worklet function `imNotAWorklet` on the UI thread.\nSee https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details.',
67+
'[Worklets] Tried to synchronously call a non-worklet function `imNotAWorklet` on the UI thread.\nSee https://docs.swmansion.com/react-native-worklets/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details.',
6868
);
6969
});
7070
});

packages/react-native-worklets/Common/cpp/worklets/Resources/ValueUnpacker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const char ValueUnpackerCode[] =
4040
} else if (category === 'RemoteFunction') {
4141
var fun = function fun() {
4242
var label = remoteFunctionName ? "function `".concat(remoteFunctionName, "`") : 'anonymous function';
43-
throw new Error("[Worklets] Tried to synchronously call a non-worklet ".concat(label, " on the UI thread.\nSee https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details."));
43+
throw new Error("[Worklets] Tried to synchronously call a non-worklet ".concat(label, " on the UI thread.\nSee https://docs.swmansion.com/react-native-worklets/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details."));
4444
};
4545
fun.__remoteFunction = objectToUnpack;
4646
return fun;

packages/react-native-worklets/src/bundleUnpacker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function bundleValueUnpacker(
2626
? `function \`${remoteFunctionName}\``
2727
: 'anonymous function';
2828
throw new WorkletsError(`Tried to synchronously call a non-worklet ${label} on the UI thread.
29-
See https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details.`);
29+
See https://docs.swmansion.com/react-native-worklets/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details.`);
3030
};
3131
remoteFunctionHolder.__remoteFunction = objectToUnpack;
3232
return remoteFunctionHolder;

packages/react-native-worklets/src/valueUnpacker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function __installUnpacker() {
6868
: 'anonymous function';
6969
// eslint-disable-next-line reanimated/use-worklets-error
7070
throw new Error(`[Worklets] Tried to synchronously call a non-worklet ${label} on the UI thread.
71-
See https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details.`);
71+
See https://docs.swmansion.com/react-native-worklets/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details.`);
7272
};
7373
fun.__remoteFunction = objectToUnpack;
7474
return fun;

0 commit comments

Comments
 (0)