Skip to content

Conversation

tjzel
Copy link
Collaborator

@tjzel tjzel commented Sep 30, 2025

Summary

To reduce the impact on the Bundle that react-native-worklets has in Web environments I introduced .web.ts file implementations where it was applicable. This also allowed to simplify some bits of the code as all uses of SHOULD_BE_USE_WEB and ifs could be removed.

I also made some examples to be disabled on platform-basis, as i.e. some examples check Worklets API that aren't available in Web implementation (like executeOnUIRuntimeSync).

Test plan

  • Native app works
  • Web app works
  • New Jest Runtime test suite that checks if the exported API for web and native is the same passes.
  • Check webpack

@tomekzaw
Copy link
Member

tomekzaw commented Oct 1, 2025

removing SHOULD_BE_USE_WEB is simply unacceptable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants