Skip to content

fix: update schedule lambda signature - #16

Merged
janicduplessis merged 1 commit into
appandflow:mainfrom
Mhp23:patch-1
Sep 8, 2026
Merged

janicduplessis merged 1 commit into
appandflow:mainfrom
Mhp23:patch-1

Conversation

@Mhp23

@Mhp23 Mhp23 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Building the library fails in React Native with the following C++ compilation error:

No matching member function for call to 'schedule'

The WorkletRuntime::schedule API signature was updated. It now strictly expects a std::function<void(jsi::Runtime &)> rather than a zero-argument callback.

The previous zero-argument lambda ([runtime]() { ... }) can no longer be implicitly converted to the new expected function type, causing the compilation to break.

Updated the scheduled lambda in TransformerTextInputRuntime.cpp to accept the jsi::Runtime & parameter, satisfying the new API requirements:

// Before
runtime->schedule([runtime]() { gUiRuntime = runtime; });

// After
runtime->schedule([runtime](jsi::Runtime &) { gUiRuntime = runtime; });

React Native: 0.87.1

@janicduplessis

Copy link
Copy Markdown
Contributor

Looks good, thanks for the fix!

@janicduplessis
janicduplessis merged commit 5fd66c0 into appandflow:main Sep 8, 2026
5 checks passed
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.

2 participants