From 36c79dffe478a3adf0826d0fb5c44af0be054335 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Tue, 16 Sep 2025 11:56:14 -0700 Subject: [PATCH 1/4] Add a warning about lack of devtool support --- docs/virtualview.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/virtualview.md b/docs/virtualview.md index d76f28ad154..f83a8cfa845 100644 --- a/docs/virtualview.md +++ b/docs/virtualview.md @@ -41,6 +41,11 @@ Blocking the main thread can provide a better user experience by preventing flas However, blocking the main thread also comes with tradeoffs. If an update operation, such as mounting the children of a `VirtualView`, takes too long to finish, it can now drop frames. Dropping more than a couple frames can lead to a worse user experience by making the app feel sluggish and non-responsive. Dropping too many frames may cause the operating system to display a modal indicating the app is not responsive, or it may even terminate your app! +:::warning +Devtools currently does not support debugging main thread renders. This means if you are debugging code called from `onModeChange` that is rendered on main thread, your debugger may freeze. +::: + + ### Prerendering `VirtualView` enables you to benefit from main thread rendering while mitigating the disadvantages of dropped frames by rendering earlier before it is needed. This is called “prerendering”. From 25e0743ae4d8b788345c554d24269ba5562a4cd0 Mon Sep 17 00:00:00 2001 From: Luna Date: Tue, 16 Sep 2025 13:20:18 -0700 Subject: [PATCH 2/4] Update virtualview.md --- docs/virtualview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/virtualview.md b/docs/virtualview.md index f83a8cfa845..eff5bfd972e 100644 --- a/docs/virtualview.md +++ b/docs/virtualview.md @@ -42,7 +42,7 @@ Blocking the main thread can provide a better user experience by preventing flas However, blocking the main thread also comes with tradeoffs. If an update operation, such as mounting the children of a `VirtualView`, takes too long to finish, it can now drop frames. Dropping more than a couple frames can lead to a worse user experience by making the app feel sluggish and non-responsive. Dropping too many frames may cause the operating system to display a modal indicating the app is not responsive, or it may even terminate your app! :::warning -Devtools currently does not support debugging main thread renders. This means if you are debugging code called from `onModeChange` that is rendered on main thread, your debugger may freeze. +DevTools currently does not support debugging JavaScript on the main thread. This means if you are debugging code called from `onModeChange` that is rendered on the main thread, your debugger may freeze. ::: From cefa0c23aba7e714aca923221fbee6d0c93f73c6 Mon Sep 17 00:00:00 2001 From: Luna Date: Wed, 17 Sep 2025 10:29:38 -0700 Subject: [PATCH 3/4] Update docs/virtualview.md Co-authored-by: Ruslan Lesiutin <28902667+hoxyq@users.noreply.github.com> --- docs/virtualview.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/virtualview.md b/docs/virtualview.md index eff5bfd972e..0a8bef400bf 100644 --- a/docs/virtualview.md +++ b/docs/virtualview.md @@ -42,7 +42,9 @@ Blocking the main thread can provide a better user experience by preventing flas However, blocking the main thread also comes with tradeoffs. If an update operation, such as mounting the children of a `VirtualView`, takes too long to finish, it can now drop frames. Dropping more than a couple frames can lead to a worse user experience by making the app feel sluggish and non-responsive. Dropping too many frames may cause the operating system to display a modal indicating the app is not responsive, or it may even terminate your app! :::warning -DevTools currently does not support debugging JavaScript on the main thread. This means if you are debugging code called from `onModeChange` that is rendered on the main thread, your debugger may freeze. +DevTools currently does not support debugging JavaScript on the main thread. This means if you are using breakpoints to debug code called from `onModeChange` that is executed on the main thread, your debugger may freeze. + +Debugging all other parts of your JavaScript code should work as expected. We are working on closing this gap before releasing `VirtualView` to stable channels of React Native. ::: From 374d965dbb01f307456f4fd9917f0cf4c42ef8bd Mon Sep 17 00:00:00 2001 From: Luna Date: Wed, 17 Sep 2025 10:30:42 -0700 Subject: [PATCH 4/4] Update virtualview.md reordering some words --- docs/virtualview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/virtualview.md b/docs/virtualview.md index 0a8bef400bf..ca8dea81151 100644 --- a/docs/virtualview.md +++ b/docs/virtualview.md @@ -42,7 +42,7 @@ Blocking the main thread can provide a better user experience by preventing flas However, blocking the main thread also comes with tradeoffs. If an update operation, such as mounting the children of a `VirtualView`, takes too long to finish, it can now drop frames. Dropping more than a couple frames can lead to a worse user experience by making the app feel sluggish and non-responsive. Dropping too many frames may cause the operating system to display a modal indicating the app is not responsive, or it may even terminate your app! :::warning -DevTools currently does not support debugging JavaScript on the main thread. This means if you are using breakpoints to debug code called from `onModeChange` that is executed on the main thread, your debugger may freeze. +DevTools does not currently support debugging JavaScript on the main thread. This means if you are using breakpoints to debug code called from `onModeChange`, that is executed on the main thread, your debugger may freeze. Debugging all other parts of your JavaScript code should work as expected. We are working on closing this gap before releasing `VirtualView` to stable channels of React Native. :::