Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inject _WORKLET to RN runtime #4511

Merged
merged 3 commits into from
Jun 6, 2023
Merged

Inject _WORKLET to RN runtime #4511

merged 3 commits into from
Jun 6, 2023

Conversation

tomekzaw
Copy link
Member

@tomekzaw tomekzaw commented May 31, 2023

Summary

Fixes #4506 and fixes #4507.

Test plan

@leandro-carlos
Copy link

where i inject _WORKLET ?

@t0ma5h
Copy link

t0ma5h commented Jun 1, 2023

@tomekzaw is there an estimate to when this will get merged or should i just fork it 😁?

Copy link
Member

@kmagiera kmagiera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting this has to be added in three places instead of just one, but what can you do 🤷

@tomekzaw
Copy link
Member Author

tomekzaw commented Jun 5, 2023

Once we merge #4523 it will be only two places (one for each platform), and once we cleanup runtime initialization hopefully it will be just one 😄

Co-authored-by: Tymoteusz Boba <tymoteusz.boba@swmansion.com>
@tomekzaw tomekzaw force-pushed the @tomekzaw/fix-missing-worklet branch from 14fb217 to cc8531c Compare June 5, 2023 13:51
@piaskowyk
Copy link
Member

According to my investigation, in out code is possible to call worklet function before globals initialisation - runOnUI doesn't imports core.ts

import { useSharedValue } from 'react-native-reanimated';
console.log(_WORKLET, useSharedValue); // doesn't work
console.log(useSharedValue, _WORKLET); // works

@tomekzaw tomekzaw added this pull request to the merge queue Jun 6, 2023
Merged via the queue into main with commit a27e45f Jun 6, 2023
10 checks passed
@tomekzaw tomekzaw deleted the @tomekzaw/fix-missing-worklet branch June 6, 2023 14:31
@alistairholt
Copy link

Great to see this merged. Will it make it into a release soon?

@tomekzaw
Copy link
Member Author

Yep, we're releasing 3.3.0 today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants