#5261·preact

Support `REACT_RECOVERABLE_TYPE` in `use`

Author: upupmingCreated Sep 14, 2026Updated Sep 14, 2026
Labelsfeature request

Describe the feature you'd love to see A clear and concise description of what you'd love to see added to Preact.

In React 19.3, browser is introducted to use with use for early return on non-browser environments. https://react.dev/blog/2026/09/09/react-19-3#new-react-dom-features

Inside use, they used REACT_RECOVERABLE_TYPE for returning undefined.

https://github.com/react/react/blob/main/packages/react-dom/src/shared/ReactDOMBrowser.js

https://github.com/react/react/blob/9b9385327857d1211fb4dc022122d897fb38bc5a/packages/react-reconciler/src/ReactFiberHooks.js#L1167-L1171

In ReactLynx, we have dual-thread concept, we are planning to provide some API like browser but for background thread, the API may be like:

javascript
function CameraPanel() {
  use(background('Camera APIs are unavailable on Main Thread'));
  // IFR (main thread) does not go here
  const camera = NativeModules.Camera;
  return <CameraView camera={camera} />;
}

Will use API support something like REACT_RECOVERABLE_TYPE for safely return nothing and continuing rendering?

Additional context (optional) Add any other context or screenshots about the feature request here.