diff --git a/Libraries/Components/ScrollView/ScrollViewStickyHeader.js b/Libraries/Components/ScrollView/ScrollViewStickyHeader.js index 05e1af3ad0..20d5d344f8 100644 --- a/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +++ b/Libraries/Components/ScrollView/ScrollViewStickyHeader.js @@ -177,7 +177,7 @@ class ScrollViewStickyHeader extends React.Component { // Fabric Detection // eslint-disable-next-line dot-notation const isFabric = !!( - this._ref && this._ref['_internalInstanceHandle']?.stateNode?.canonical + this._ref && this._ref._internalInstanceHandle?.stateNode?.canonical ); // Initially and in the case of updated props or layout, we diff --git a/packages/rn-tester/js/examples/Share/ShareExample.js b/packages/rn-tester/js/examples/Share/ShareExample.js index 3ec9a7d6f5..1bcd7cfd17 100644 --- a/packages/rn-tester/js/examples/Share/ShareExample.js +++ b/packages/rn-tester/js/examples/Share/ShareExample.js @@ -76,6 +76,46 @@ const ShareMessageWithTitle = () => { ); }; +const SharedAction = () => { + const [shared, setShared] = React.useState(); + + const sharedAction = async () => { + try { + const result = await Share.share( + { + title: 'Create native apps', + message: ('React Native combines the best parts of native development with React, a best-in-class JavaScript library for building user interfaces.': string), + url: 'https://reactnative.dev/', + }, + { + subject: 'MUST READ: Create native apps with React Native', + dialogTitle: 'Share React Native Home Page', + tintColor: 'blue', + }, + ); + if (result.action === Share.sharedAction) { + setShared(result.action); + } else if (result.action === Share.dismissedAction) { + //iOS only, if dialog was dismissed + setShared(null); + } + } catch (e) { + console.error(e); + } + }; + return ( + + action: {shared ? shared : 'null'} + Create native apps + + React Native combines the best parts of native development with React, a + best-in-class JavaScript library for building user interfaces. + +