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: website/architecture/landing-page.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,11 +34,11 @@ In the current architecture, we use `onLayout` to get the measurements of the vi
34
34
functionViewWithTooltip() {
35
35
// ...
36
36
37
-
// We get the layout information and pass to ToolTip to position itself
37
+
// We get the layout information and pass to Tooltip to position itself
38
38
constonLayout=React.useCallback(event=> {
39
39
targetRef.current?.measureInWindow((x, y, width, height) => {
40
40
// This state update is not guaranteed to run in the same commit
41
-
// This results in a visual "jump" as the ToolTip repositions itself
41
+
// This results in a visual "jump" as the Tooltip repositions itself
42
42
setTargetRect({x, y, width, height});
43
43
});
44
44
}, []);
@@ -62,7 +62,7 @@ function ViewWithTooltip() {
62
62
63
63
useLayoutEffect(() => {
64
64
// The measurement and state update for `targetRect` happens in a single commit
65
-
// allowing ToolTip to position itself without intermediate paints
65
+
// allowing Tooltip to position itself without intermediate paints
66
66
targetRef.current?.measureInWindow((x, y, width, height) => {
67
67
setTargetRect({x, y, width, height});
68
68
});
@@ -82,11 +82,11 @@ function ViewWithTooltip() {
82
82
<div className="TwoColumns TwoFigures">
83
83
<figure>
84
84
<img src="/img/new-architecture/async-on-layout.gif" alt="A view that is moving to the corners of the viewport and center with a tooltip rendered either above or below it. The tooltip is rendered after a short delay after the view moves" />
85
-
<figcaption>Asynchronous measurement and render of the ToolTip. [See code](https://gist.github.com/lunaleaps/eabd653d9864082ac1d3772dac217ab9).</figcaption>
85
+
<figcaption>Asynchronous measurement and render of the Tooltip. [See code](https://gist.github.com/lunaleaps/eabd653d9864082ac1d3772dac217ab9).</figcaption>
86
86
</figure>
87
87
<figure>
88
88
<img src="/img/new-architecture/sync-use-layout-effect.gif" alt="A view that is moving to the corners of the viewport and center with a tooltip rendered either above or below it. The view and tooltip move in unison." />
89
-
<figcaption>Synchronous measurement and render of the ToolTip. [See code](https://gist.github.com/lunaleaps/148756563999c83220887757f2e549a3).</figcaption>
89
+
<figcaption>Synchronous measurement and render of the Tooltip. [See code](https://gist.github.com/lunaleaps/148756563999c83220887757f2e549a3).</figcaption>
0 commit comments