You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/website/blog/2021-06-07-foundry-announcement.mdx
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ specific components and observe how they respond to style and props changes.
49
49
### The Transient Render Engine
50
50
51
51
The Transient Render engine (TRE) transforms DOM nodes into a ready-to-render
52
-
data structure called the Transient Render Tree (TRT), which is made of <Referencetype="api-def"name="TNodes"url="/react-native-render-html/api/tnode" />. It allows features such as **whitespace collapsing**, **hoisting**,
52
+
data structure called the Transient Render Tree (TRT), which is made of <Referencetype="api-def"name="TNodes"url="/api/tnode" />. It allows features such as **whitespace collapsing**, **hoisting**,
53
53
**CSS inheritance** and more.
54
54
55
55
A legitimate concerns is whether it adds any overhead. The short answer is
@@ -59,16 +59,16 @@ its speed. In addition to the enumerated features, the new transient data
59
59
structure offers obvious advantages for library consumers:
60
60
61
61
- It is totally transparent and predictable; you can create snapshots of a
62
-
​<Referencetype="api-def"name="TNode"url="/react-native-render-html/api/tnode" /> thanks to the <Referencetype="api-def"name="TNodeShape"member="snaphot()"
63
-
url="/react-native-render-html/api/tnodeshape#snapshot" /> method for an
62
+
​<Referencetype="api-def"name="TNode"url="/api/tnode" /> thanks to the <Referencetype="api-def"name="TNodeShape"member="snaphot()"
63
+
url="/api/tnodeshape#snapshot" /> method for an
64
64
intuitive understanding of the engine internals. This feature is extremely
65
65
handy for debugging and testing!
66
66
- It's hackable by allowing to define custom **content models** for tags. Say
67
67
hi to inline images!
68
68
- It is shipped with a CSS processor which enforces strict translation rules
69
69
from CSS to React Native styles. Say goodbye to native crashes caused by
70
70
unsupported CSS properties! See the [**dedicated
71
-
article**](/react-native-render-html/docs/flow/css-processing) for
71
+
article**](/docs/flow/css-processing) for
72
72
reference.
73
73
- It paves the way to server side (or build-time) pre-rendering in the future,
74
74
and, why not, a react fiber and MDX builder.
@@ -78,8 +78,8 @@ Below is an example of HTML transformation into a Transient Render Tree:
78
78
<TNodeTransformDisplay title="Translation of HTML markup into a Transient Render Tree" caption="This figure shows how HTML markup translates to a transient render tree structure. The markup for the TRT is JSX and has been produced by the snapshot() method. Notice that whitespace have collapsed!" html="%3Ca%20href%3D%22https%3A%2F%2Fdomain.com%22%3E%0AThis%20is%0A%3Cspan%3Ephrasing%20content%3C%2Fspan%3E%0A%3Cimg%20src%3D%22https%3A%2F%2Fdomain.com%2Flogo.jpg%22%20%2F%3E%0A%20%20%20%20and%20this%20is%20%3Cstrong%3Etoo%3C%2Fstrong%3E.%0A%3C%2Fa%3E" snapshot="%3CTDocument%20tagName%3D%22html%22%3E%0A%20%20%3CTBlock%20tagName%3D%22body%22%3E%0A%20%20%20%20%3CTBlock%20tagName%3D%22a%22%20href%3D%22https%3A%2F%2Fdomain.com%22%3E%0A%20%20%20%20%20%20%3CTPhrasing%20anonymous%3E%0A%20%20%20%20%20%20%20%20%3CTText%20anonymous%20data%3D%22This%20is%20%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3CTText%20tagName%3D%22span%22%20data%3D%22phrasing%20content%22%20%2F%3E%0A%20%20%20%20%20%20%3C%2FTPhrasing%3E%0A%20%20%20%20%20%20%3CTBlock%20tagName%3D%22img%22%20src%3D%22https%3A%2F%2Fdomain.com%2Flogo.jpg%22%20%2F%3E%0A%20%20%20%20%20%20%3CTPhrasing%20anonymous%3E%0A%20%20%20%20%20%20%20%20%3CTText%20anonymous%20data%3D%22and%20this%20is%20%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3CTText%20tagName%3D%22strong%22%20data%3D%22too%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3CTText%20anonymous%20data%3D%22.%22%20%2F%3E%0A%20%20%20%20%20%20%3C%2FTPhrasing%3E%0A%20%20%20%20%3C%2FTBlock%3E%0A%20%20%3C%2FTBlock%3E%0A%3C%2FTDocument%3E" />
79
79
80
80
:::tip Learn More
81
-
A detailed review of the Transient Render Engine has its [**dedicated article**](/react-native-render-html/docs/flow/transient-render-engine).
82
-
You can also learn more about the new data flow in the [**Architecture article**](/react-native-render-html/docs/architecture).
81
+
A detailed review of the Transient Render Engine has its [**dedicated article**](/docs/flow/transient-render-engine).
82
+
You can also learn more about the new data flow in the [**Architecture article**](/docs/architecture).
83
83
:::
84
84
85
85
### Custom Renderers
@@ -106,9 +106,9 @@ function H1Renderer({
106
106
}
107
107
```
108
108
Default renderers support `onPress` and many more interesting props! See
```jsx title="Foundry Custom Renderer with Children Tampering"
114
114
importReactfrom'react';
@@ -135,14 +135,14 @@ function ArticleWithAds({
135
135
}
136
136
```
137
137
This custom renderer will insert an `AdComponent` element after the second and
138
-
fourth children of this <Referencetype="api-def"name="TNode"url="/react-native-render-html/api/tnode" />.
138
+
fourth children of this <Referencetype="api-def"name="TNode"url="/api/tnode" />.
139
139
140
140
Last but not least, custom renderers can reuse internal renderers (those
141
141
special renderers displaying lists, images and anchors). For this purpose,
142
-
you can use the <Referencetype="api-def"name="InternalRenderer"url="/react-native-render-html/api/customrendererprops#internalrenderer" /> prop or <Referencetype="api-def"name="useInternalRenderer"url="/react-native-render-html/api/useinternalrenderer" /> hook.
142
+
you can use the <Referencetype="api-def"name="InternalRenderer"url="/api/customrendererprops#internalrenderer" /> prop or <Referencetype="api-def"name="useInternalRenderer"url="/api/useinternalrenderer" /> hook.
143
143
144
144
:::tip Learn More
145
-
[**Check-out the Custom Rendering guide**](/react-native-render-html/docs/guides/custom-renderers).
145
+
[**Check-out the Custom Rendering guide**](/docs/guides/custom-renderers).
146
146
:::
147
147
148
148
### Font Selection
@@ -153,10 +153,10 @@ the system will often lead to native crashes. To reconcile this inconsistency, t
153
153
Processor will try to match each font in a `font-family` property with a list
154
154
of supported fonts available in the system by the library consumer. The prop to
155
155
declare such fonts is <Referencetype="api-def"name="systemFonts"
for `<h2>` and `<h3>` tags. We will also need to register a `<header>` renderer
392
392
to store the header height. If you remember well, the DOM has a structure like
393
393
below:
@@ -665,7 +665,7 @@ So, let's fix it!
665
665
### Fixing Code Samples
666
666
667
667
Code samples are rendered by Docusaurus in a `<pre class="prism-code">` tag. We need to fix two issues:
668
-
668
+
669
669
- Define a custom renderer for `pre` tags, which renders inside a `ScrollView` when matching the `"prism-code"` class.
670
670
- Define a custom renderer for `span` tags. We need to do that because the
671
671
whole code block is rendered inside a `code` element with a `display: flex;
@@ -820,7 +820,7 @@ CSS, it only spans to the text content-area. Below is a diagram explaining the d
820
820
 See a complete explanation [in this excellent article on CSS text styling](https://iamvdo.me/en/blog/css-font-metrics-line-height-and-vertical-align).
821
821
2.`padding` and `border` are ignored in nested text elements.
822
822
823
-
All these features are required to get the official blog appealing anchors styles:
823
+
All these features are required to get the official blog appealing anchors styles:
824
824
825
825

826
826
@@ -845,4 +845,4 @@ below features have been implemented:
845
845
That's all for this tutorial! Don't forget to [give us a star](https://github.com/meliorence/react-native-render-html) if you enjoy this library.
846
846
You can also [follow me on Twitter](https://twitter.com/jsamrn), and [rate this library on Open Base](https://openbase.com/js/react-native-render-html?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge).
Copy file name to clipboardExpand all lines: apps/website/blog/2021-10-23-6-2-updates.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -428,7 +428,7 @@ of those bugs.
428
428
429
429
## Learn More
430
430
431
-
Check out [the release notes in the official repository](https://github.com/meliorence/react-native-render-html/releases/tag/v6.2.0).
432
-
Moreover, if you encounter any issue while upgrading from a lower minor (6.0.x, 6.1.x), you are welcome to [comment this Github issue](https://github.com/meliorence/react-native-render-html/issues/526)!
431
+
Check out [the release notes in the official repository](https://github.com/meliorence/releases/tag/v6.2.0).
432
+
Moreover, if you encounter any issue while upgrading from a lower minor (6.0.x, 6.1.x), you are welcome to [comment this Github issue](https://github.com/meliorence/issues/526)!
0 commit comments