Skip to content

docs: update Worklets import forwarding setup#22

Open
eliotgevers wants to merge 2 commits into
software-mansion-labs:mainfrom
eliotgevers:codex/update-worklets-import-forwarding
Open

docs: update Worklets import forwarding setup#22
eliotgevers wants to merge 2 commits into
software-mansion-labs:mainfrom
eliotgevers:codex/update-worklets-import-forwarding

Conversation

@eliotgevers

Copy link
Copy Markdown

Summary

Updates the React Native Worklets setup instructions to use importForwarding for remend when using react-native-worklets 0.10 or newer.

With the old workletizableModules option on newer Worklets versions, remend can be captured into the generated worklet closure as a remote function, which can cause this runtime error when StreamdownText mounts:

[Worklets] Tried to synchronously call a Remote Function.

The updated config forwards the remend import into the generated worklet so markdown preprocessing can still run on the worklet runtime. The docs also keep a short note for older Worklets versions that still use workletizableModules.

Closes #21.

Changes

  • Replace workletizableModules: ['remend'] with importForwarding: { moduleNames: ['remend'] } in the setup examples
  • Update both Expo and React Native CLI snippets
  • Keep a compatibility note for older react-native-worklets versions

Test plan

  • Docs-only change
  • Verified the updated config in an Expo app using react-native-worklets 0.10.x
  • Confirmed the generated worklet imports remend directly instead of capturing it in __closure
  • Confirmed StreamdownText renders without the remote function error

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StreamdownText cannot be used

1 participant