-
Notifications
You must be signed in to change notification settings - Fork 476
feat(windows): add New Architecture support #1147
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
Changes from 40 commits
b3739e6
73e701f
b231d74
7967f29
7e5116e
beb94d5
10b538b
36a9635
f289477
50e5255
66c9429
b01454d
1ea1df7
015b4ab
6f1d52f
5e055bc
a794eb1
f1fc1d4
8387705
123b3fd
8dade8c
8acb3b0
e50e5e1
be17698
3782d55
539a4c1
00913a6
e49a0ef
35b24a1
452ed6f
dabd92a
66e0c92
ad9ce4d
456d9fa
b6bfb3b
b9f2e55
dd5b0fb
eef71c1
ce96c4b
ee87b26
f79f198
ef227e7
a1d931c
9bc5354
67526ce
c3c8874
8099d49
dd1dbac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ import { | |
ScrollView, | ||
StyleSheet, | ||
Text, | ||
TurboModuleRegistry, | ||
View, | ||
} from "react-native"; | ||
import type { TestStep, TestValue } from "./tests"; | ||
|
@@ -129,8 +130,9 @@ function Functional(): JSX.Element { | |
} | ||
}) | ||
.then(async () => { | ||
const AsyncStorageTestSupport = | ||
NativeModules["AsyncStorageTestSupport"]; | ||
const AsyncStorageTestSupport = TurboModuleRegistry | ||
? TurboModuleRegistry.get("AsyncStorageTestSupport") | ||
: NativeModules["AsyncStorageTestSupport"]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TurboModuleRegistry already fallsback to NativeModules, so no need to check both. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When calling TurboModuleRegistry directly, the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're getting typing issues because type AsyncStorageDelegate = () => void;
type AsyncStorageTestSupport = {
test_setDelegate: (delegate: AsyncStorageDelegate) => void;
test_unsetDelegate: (delegate: AsyncStorageDelegate) => void;
}; Then use it like this: const AsyncStorageTestSupport = TurboModuleRegistry.get<AsyncStorageTestSupport>("AsyncStorageTestSupport"); |
||
|
||
for (const [currentName, test] of Object.entries(tests)) { | ||
const name = currentName + " with delegate"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tido64 is this change a good way to make sure RNTA uses 0.75.5, instead of publishing this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to add a resolution override. You can bump the package in
yarn.lock
. Since it's already been bumped, you can remove this entry only.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.