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

support RN 74 on iOS #90

Merged
merged 1 commit into from
May 6, 2024
Merged

support RN 74 on iOS #90

merged 1 commit into from
May 6, 2024

Conversation

RyanCommits
Copy link
Contributor

React 18.3.0 moved the currentProps object into the canonical property. PR here.

This is causing us to not be able to read our FS attributes off of the component instance.

RN 0.74.0 has a new function (PR here) called getInternalInstanceHandleFromPublicInstance that will help us get at the currentProps property. If getInternalInstanceHandleFromPublicInstance exists, we'll try to use it as it's indicative of the new Fabric Component Tree.

@wiz-inc-e194d921e3-fullstorydev
Copy link

wiz-inc-e194d921e3-fullstorydev bot commented May 3, 2024

Wiz Scan Summary

IaC Misconfigurations 0C 0H 0M 0L 0I
Vulnerabilities 0C 0H 1M 0L 0I
Sensitive Data 0C 0H 0M 0L 0I
Total 0C 0H 1M 0L 0I
Secrets 0🔑

@JoshMiers-FS
Copy link
Contributor

Adding @martin-fs since this is iOS related.

Copy link
Contributor

@martin-fs martin-fs left a comment

Choose a reason for hiding this comment

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

Easy to review with "hide whitespace" option.

Looks like the getInternalInstanceHandleFromPublicInstance thingy was made "public" here.

Slightly worrying that the function that necessitated exposing it it is documented with Remove this once Paper is no longer supported and DOM Node API are enabled by default in RN.

Updated in a later PR to say: TODO(T174762768): Remove this once OSS versions of renderers will be synced.

So we can be pretty sure it will disappear at some point, but maybe at that time another entry point will be provided. Maybe access _internalInstanceHandle directly somehow.

@RyanCommits RyanCommits merged commit 39d883e into master May 6, 2024
6 checks passed
@RyanCommits RyanCommits deleted the ryanwang/RN-74-ios branch May 6, 2024 17:59
@bhandanyan-nomad
Copy link

Does this break other react-native versions? I'm using 0.71 and with an upgrade of the fullstory package from 1.5.0 to 1.6.0 both Android and iOS builds are failing

@RyanCommits
Copy link
Contributor Author

Does this break other react-native versions? I'm using 0.71 and with an upgrade of the fullstory package from 1.5.0 to 1.6.0 both Android and iOS builds are failing

Could you provide more information on the error you're seeing? @bhandanyan-nomad

@bhandanyan-nomad
Copy link

bhandanyan-nomad commented May 13, 2024

Android

error Unable to resolve module react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance from /root/repo/node_modules/@fullstory/react-native/src/index.ts: react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance could not be found within the project or in these directories:
Error: Unable to resolve module react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance from /root/repo/node_modules/@fullstory/react-native/src/index.ts: react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance could not be found within the project or in these directories:
  node_modules/@fullstory/react-native/node_modules
  node_modules/@fullstory/react-native/node_modules
  node_modules
  node_modules

Related line of code:

require('react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance').getInternalInstanceHandleFromPublicInstance;

iOS

error Unable to resolve module react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance from ~/node_modules/@fullstory/react-native/src/index.ts: react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance could not be found within the project or in these directories:
  node_modules/@fullstory/react-native/node_modules
  node_modules

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.

4 participants