Skip to content

Commit 5cd0239

Browse files
5ZYSZ3Kjsamr
authored andcommitted
feat: fix example app and switch from react-native-render-html to @native-html/render
1 parent 228ce17 commit 5cd0239

51 files changed

Lines changed: 421 additions & 445 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ I swear that I have completed these tasks before submitting:
5151
Print the versions of each library (remove unused)
5252
-->
5353

54-
- react-native-render-html:
54+
- @native-html/render:
5555
- @native-html/table-plugin:
5656
- @native-html/iframe-plugin:
5757
- react-native-webview:

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Plugins for react-native-render-html
1+
# Plugins for @native-html/render
22

33
[![](https://img.shields.io/discord/736906960041148476?label=discord)](https://discord.gg/3B9twTMEzb)
44

@@ -9,11 +9,3 @@
99
| [@native-html/iframe-plugin](packages/iframe-plugin#readme) | [![npm](https://img.shields.io/npm/v/@native-html/iframe-plugin)](https://www.npmjs.com/package/@native-html/iframe-plugin) | [![CI](https://github.com/native-html/plugins/workflows/iframe/badge.svg?branch=master)](https://github.com/native-html/plugins/actions?query=branch%3Amaster+workflow%3Aiframe) | [![codecov](https://codecov.io/gh/native-html/plugins/branch/master/graph/badge.svg?flag=iframe-plugin)](https://codecov.io/gh/native-html/plugins?flag=iframe-plugin) |
1010
| [@native-html/heuristic-table-plugin](packages/heuristic-table-plugin#readme) | [![npm](https://img.shields.io/npm/v/@native-html/heuristic-table-plugin)](https://www.npmjs.com/package/@native-html/heuristic-table-plugin) | [![CI](https://github.com/native-html/plugins/workflows/heuristic-table/badge.svg?branch=master)](https://github.com/native-html/plugins/actions?query=branch%3Amaster+workflow%3Aheuristic-table) | [![codecov](https://codecov.io/gh/native-html/plugins/branch/master/graph/badge.svg?flag=heuristic-table-plugin)](https://codecov.io/gh/native-html/plugins?flag=heuristic-table-plugin) |
1111
| [@native-html/table-plugin](packages/table-plugin#readme) | [![npm](https://img.shields.io/npm/v/@native-html/table-plugin)](https://www.npmjs.com/package/@native-html/table-plugin) | [![CI](https://github.com/native-html/plugins/workflows/table/badge.svg?branch=master)](https://github.com/native-html/plugins/actions?query=branch%3Amaster+workflow%3Atable) | [![codecov](https://codecov.io/gh/native-html/plugins/branch/master/graph/badge.svg?flag=table-plugin)](https://codecov.io/gh/native-html/plugins?flag=table-plugin) |
12-
13-
## Plugins Compat Table
14-
15-
| react-native-render-html | iframe | table | heuristic-table |
16-
| ------------------------ | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
17-
| ≥ 4.2.1 < 5.0.0 | _No Plugin, iframes were rendered internally_ | 2.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/4.x#readme)) | _No Plugin_ |
18-
| ≥ 5.0.0 < 6.0.0 | 1.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/5.x/packages/iframe-plugin#readme)) | 3.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/5.x/packages/table-plugin#readme)) | _No Plugin_ |
19-
| ≥ 6.0.0 | 2.x ([documentation](https://github.com/native-html/plugins/tree/master/packages/iframe-plugin#readme)) | 4.x ([documentation](https://github.com/native-html/plugins/tree/@native-html/table-plugin@4.0.3/packages/table-plugin#readme)) <br> 5.x ([documentation](https://github.com/native-html/plugins/tree/master/packages/table-plugin#readme)) | 0.x ([documentation](https://github.com/native-html/plugins/tree/master/packages/heuristic-table-plugin#readme)) |

example/CustomExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import RenderHTML from 'react-native-render-html';
2+
import RenderHTML from '@native-html/render';
33
import { useHtmlTableProps, tableModel } from '@native-html/table-plugin';
44
import ClickTable from './ClickTable';
55
import WebView from 'react-native-webview';

example/HeuristicTableExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import RenderHTML from 'react-native-render-html';
2+
import RenderHTML from '@native-html/render';
33
import tableRenderers from '@native-html/heuristic-table-plugin';
44

55
const table1 = `

example/SimpleExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import RenderHTML from 'react-native-render-html';
2+
import RenderHTML from '@native-html/render';
33
import table from '@native-html/table-plugin';
44
import WebView from 'react-native-webview';
55

example/YoutubeExample.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import RenderHTML from 'react-native-render-html';
2+
import RenderHTML from '@native-html/render';
33
import iframe, { iframeModel } from '@native-html/iframe-plugin';
44
import WebView from 'react-native-webview';
55

@@ -22,7 +22,7 @@ const youtubeIframe = `
2222
<p>
2323
<iframe width="560"
2424
height="315"
25-
src="https://www.youtube.com/embed/POK_Iw4m3fY"
25+
src="https://www.youtube.com/watch?v=YWEsoSosQXQ"
2626
frameborder="0"
2727
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
2828
allowfullscreen>

example/app.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default {
99
version: pluginVersion,
1010
orientation: 'default',
1111
description:
12-
'Try out official plugins for react-native-render-html on your device!',
12+
'Try out official plugins for @native-html/render on your device!',
1313
icon: './assets/icon.png',
1414
splash: {
1515
backgroundColor: '#ffffff'

example/package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,29 @@
99
"eject": "expo eject"
1010
},
1111
"dependencies": {
12+
"@formidable-webview/webshell": "^2.6.0",
1213
"@native-html/heuristic-table-plugin": "workspace:*",
1314
"@native-html/iframe-plugin": "workspace:*",
15+
"@native-html/plugins-core": "workspace:*",
16+
"@native-html/render": "1.0.0-alpha.0",
1417
"@native-html/table-plugin": "workspace:*",
1518
"@react-native-community/masked-view": "0.1.11",
1619
"@react-navigation/native": "^7.1.31",
1720
"@react-navigation/stack": "^7.8.2",
1821
"expo": "^55.0.4",
1922
"expo-status-bar": "~55.0.4",
2023
"expo-web-browser": "~55.0.9",
21-
"react": "19.2.4",
22-
"react-dom": "19.2.4",
23-
"react-native": "0.84.1",
24+
"react": "19.2.0",
25+
"react-dom": "19.2.0",
26+
"react-native": "0.83.2",
2427
"react-native-gesture-handler": "~2.30.0",
2528
"react-native-paper": "^5.15.0",
26-
"react-native-reanimated": "~4.2.2",
27-
"react-native-render-html": "6.3.4",
28-
"react-native-safe-area-context": "5.7.0",
29-
"react-native-screens": "~4.24.0",
29+
"react-native-reanimated": "~4.2.1",
30+
"react-native-safe-area-context": "5.6.2",
31+
"react-native-screens": "~4.23.0",
3032
"react-native-web": "0.21.2",
31-
"react-native-webview": "13.16.1"
33+
"react-native-webview": "13.16.0",
34+
"react-native-worklets": "^0.7.2"
3235
},
3336
"devDependencies": {
3437
"@babel/core": "^7.29.0"

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
"prettier": "^3.8.1"
3535
},
3636
"resolutions": {
37-
"react": "19.2.4",
38-
"react-dom": "19.2.4",
39-
"react-native": "0.84.1",
40-
"react-test-renderer": "19.2.4",
41-
"react-native-webview": "13.16.1"
37+
"react": "19.2.0",
38+
"react-dom": "19.2.0",
39+
"react-native": "0.83.2",
40+
"react-test-renderer": "19.2.0",
41+
"react-native-webview": "13.16.0"
4242
},
4343
"author": "Jules Sam. Randolph <jules.sam.randolph@gmail.com> (https://github.com/jsamr)",
4444
"license": "MIT",

packages/heuristic-table-plugin/README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
</p>
4040

4141
<p align="center">
42-
🔠 A 100% native component using heuristics to render tables in react-native-render-html.
42+
🔠 A 100% native component using heuristics to render tables in @native-html/render.
4343
</p>
4444

4545
<hr/>
@@ -52,19 +52,12 @@ npm add --save @native-html/heuristic-table-plugin
5252
yarn add @native-html/heuristic-table-plugin
5353
```
5454

55-
## Compat Table
56-
57-
| react-native-render-html | @native-html/heuristic-table-plugin |
58-
| ------------------------ | ------------------------------------------------------------------------------------------------------------------ |
59-
| &lt; 6.0.0 | - |
60-
| ≥ 6.0.0 | 6.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/6.x/packages/heuristic-table-plugin#readme)) |
61-
6255
## Minimal working example
6356

6457
```javascript
6558
import React from 'react';
6659
import { ScrollView } from 'react-native';
67-
import HTML from 'react-native-render-html';
60+
import HTML from '@native-html/render';
6861
import tableRenderers from '@native-html/heuristic-table-plugin';
6962

7063
const html = `

0 commit comments

Comments
 (0)