Skip to content

Commit 2907f80

Browse files
author
Anton Mogdalov
committed
Updated react-native-render-html and removed deprecated HTML usage as param
1 parent 4d85270 commit 2907f80

File tree

5 files changed

+148
-53
lines changed

5 files changed

+148
-53
lines changed

ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ PODS:
209209
- React-Core
210210
- react-native-safe-area-context (3.2.0):
211211
- React-Core
212-
- react-native-webview (11.6.1):
213-
- React-Core
212+
- react-native-webview (9.4.0):
213+
- React
214214
- React-perflogger (0.64.1)
215215
- React-RCTActionSheet (0.64.1):
216216
- React-Core/RCTActionSheetHeaders (= 0.64.1)
@@ -480,7 +480,7 @@ SPEC CHECKSUMS:
480480
React-jsinspector: 500a59626037be5b3b3d89c5151bc3baa9abf1a9
481481
react-native-maps: 2d405b4e8cee0282e4c02bac434d81450dfea877
482482
react-native-safe-area-context: f0906bf8bc9835ac9a9d3f97e8bde2a997d8da79
483-
react-native-webview: e1cdf106c6f87b894214191c0a69831d5e44ea34
483+
react-native-webview: cf5527893252b3b036eea024a1da6996f7344c74
484484
React-perflogger: aad6d4b4a267936b3667260d1f649b6f6069a675
485485
React-RCTActionSheet: fc376be462c9c8d6ad82c0905442fd77f82a9d2a
486486
React-RCTAnimation: ba0a1c3a2738be224a08092fa7f1b444ab77d309

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"postinstall": "npx jetify"
2121
},
2222
"dependencies": {
23+
"@babel/helper-hoist-variables": "^7.14.5",
2324
"@exponent/react-native-action-sheet": "^0.3.0",
2425
"@react-native-community/art": "^1.2.0",
2526
"@react-native-community/checkbox": "^0.4.2",
@@ -52,7 +53,7 @@
5253
"react-native-paper": "^4.8.1",
5354
"react-native-progress": "^4.1.2",
5455
"react-native-reanimated": "^2.1.0",
55-
"react-native-render-html": "^5.1.0",
56+
"react-native-render-html": "^6.0.0-alpha.26",
5657
"react-native-safe-area-context": "^3.2.0",
5758
"react-native-screens": "^3.2.0",
5859
"react-native-snap-carousel": "^3.9.1",

src/modules/blog/PostCard.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ export default ({ post, onPress }) => (
3737
</View>
3838
</View>
3939
<HTML
40-
html={post.excerpt.rendered}
40+
source={{
41+
html: post.excerpt.rendered
42+
}}
4143
imagesMaxWidth={Dimensions.get('window').width}
42-
ignoreNodesFunction={node => {
44+
ingnoreDomNode={node => {
4345
if (
4446
node &&
4547
node.attribs &&

src/modules/blog/PostView.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ export default (props) => {
3333
<Text style={{fontSize: 18, color: '#686868', textTransform: 'uppercase', fontWeight: 'bold', flex: 1}}>{post.title.rendered}</Text>
3434
</View>
3535
<HTML
36-
html={post.content.rendered}
36+
source={{
37+
html: post.excerpt.rendered
38+
}}
3739
imagesMaxWidth={Dimensions.get('window').width}
3840
tagsStyles={{h2: {textTransform: 'uppercase', color: '#686868'}}}
3941
imagesInitialDimensions={{width: 200}}
40-
ignoreNodesFunction={node => {
42+
ingnoreDomNode={node => {
4143
if (
4244
node &&
4345
node.attribs &&

0 commit comments

Comments
 (0)