Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 44ee6e6

Browse files
committed
chore(example): compatibility with new package extraction
1 parent 4e4d222 commit 44ee6e6

File tree

6 files changed

+14
-19
lines changed

6 files changed

+14
-19
lines changed

example/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ export default function App() {
170170
const [isSnackVisible, setIsSnackVisible] = useState(false);
171171
const { width: windowWidth } = useWindowDimensions();
172172
const availableWidth = windowWidth - 40;
173-
const onLinkPress = useCallback((e, url) => {
174-
setUrl(url);
173+
const onLinkPress = useCallback((e, href) => {
174+
setUrl(href);
175175
}, []);
176176
React.useEffect(() => {
177177
url && setIsSnackVisible(true);

example/metro.config.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
const path = require('path');
22

3+
const commonModulePath = path.resolve(__dirname, '../packages');
4+
35
module.exports = {
46
projectRoot: __dirname,
5-
watchFolders: [
6-
path.resolve('../packages/table-plugin'),
7-
path.resolve('../packages/iframe-plugin')
8-
],
7+
watchFolders: [commonModulePath],
98
resolver: {
109
extraNodeModules: new Proxy(
1110
{},
@@ -18,7 +17,7 @@ module.exports = {
1817
getTransformOptions: async () => ({
1918
transform: {
2019
experimentalImportSupport: false,
21-
inlineRequires: false
20+
inlineRequires: true
2221
}
2322
})
2423
}

packages/iframe-plugin/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"jest": "^26.6.3",
5151
"metro-react-native-babel-preset": "^0.64.0",
5252
"metro-react-native-babel-transformer": "^0.64.0",
53-
"react": "16.14.0",
53+
"react": "16.13.1",
5454
"react-native": "^0.63.2",
5555
"react-native-render-html": "6.0.0-alpha.12",
5656
"react-native-webview": "^10.9.0",
@@ -102,8 +102,5 @@
102102
}
103103
]
104104
]
105-
},
106-
"installConfig": {
107-
"hoistingLimits": "workspaces"
108105
}
109106
}

packages/plugins-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"jest": "^25",
4545
"metro-react-native-babel-preset": "^0.64.0",
4646
"metro-react-native-babel-transformer": "^0.64.0",
47-
"react": "16.14.0",
47+
"react": "16.13.1",
4848
"react-native": "^0.63.2",
4949
"react-native-render-html": "6.0.0-alpha.12",
5050
"react-test-renderer": "16.13.1",

packages/table-plugin/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"jest": "^25",
5656
"metro-react-native-babel-preset": "^0.64.0",
5757
"metro-react-native-babel-transformer": "^0.64.0",
58-
"react": "16.14.0",
58+
"react": "16.13.1",
5959
"react-native": "^0.63.2",
6060
"react-native-render-html": "6.0.0-alpha.12",
6161
"react-native-webview": "^10.9.0",
@@ -65,6 +65,7 @@
6565
},
6666
"dependencies": {
6767
"@formidable-webview/webshell": "2.3.0",
68+
"@native-html/plugins-core": "workspace:*",
6869
"@types/prop-types": "^15.7.3",
6970
"prop-types": "^15.7.2"
7071
},
@@ -106,8 +107,5 @@
106107
}
107108
]
108109
]
109-
},
110-
"installConfig": {
111-
"hoistingLimits": "workspaces"
112110
}
113111
}

yarn.lock

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,7 +2450,7 @@ __metadata:
24502450
metro-react-native-babel-preset: ^0.64.0
24512451
metro-react-native-babel-transformer: ^0.64.0
24522452
prop-types: ^15.7.2
2453-
react: 16.14.0
2453+
react: 16.13.1
24542454
react-native: ^0.63.2
24552455
react-native-render-html: 6.0.0-alpha.12
24562456
react-native-webview: ^10.9.0
@@ -2489,7 +2489,7 @@ __metadata:
24892489
jest: ^25
24902490
metro-react-native-babel-preset: ^0.64.0
24912491
metro-react-native-babel-transformer: ^0.64.0
2492-
react: 16.14.0
2492+
react: 16.13.1
24932493
react-native: ^0.63.2
24942494
react-native-render-html: 6.0.0-alpha.12
24952495
react-test-renderer: 16.13.1
@@ -2517,6 +2517,7 @@ __metadata:
25172517
"@formidable-webview/webshell": 2.3.0
25182518
"@microsoft/api-documenter": ^7.11.0
25192519
"@microsoft/api-extractor": 7.12.0
2520+
"@native-html/plugins-core": "workspace:*"
25202521
"@react-native-community/bob": ^0.16.2
25212522
"@release-it/conventional-changelog": ^2.0.0
25222523
"@testing-library/react-native": ^7.1.0
@@ -2535,7 +2536,7 @@ __metadata:
25352536
metro-react-native-babel-preset: ^0.64.0
25362537
metro-react-native-babel-transformer: ^0.64.0
25372538
prop-types: ^15.7.2
2538-
react: 16.14.0
2539+
react: 16.13.1
25392540
react-native: ^0.63.2
25402541
react-native-render-html: 6.0.0-alpha.12
25412542
react-native-webview: ^10.9.0

0 commit comments

Comments
 (0)