Comments (5)
Agree. Currently, the handling of suspense looks very unreliable, here is an example from a real code: https://github.com/artalar/reatom/blob/e6b042f273dbacb221ed77923f6c8582e22236dc/packages/npm-react/src/index.ts#L209-L210
from react.
Have you considered the suggestions in the exception?
Suspense Exception: This is not a real error! It's an implementation detail of
use
to interrupt the current render. You must either rethrow it immediately, or move theuse
call outside of thetry/catch
block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's.catch
method and pass the result touse
Which use case are these suggestions not covering?
from react.
Hi, is this still open?
from react.
I am looking to fix some issues on this repo. I've previously worked on the react-native repo.
from react.
Which use case are these suggestions not covering?
It is necessary for library authors to correctly decorate a render function. As I mentioned before, the current solution for library authors is not reliable and ugly: https://github.com/artalar/reatom/blob/e6b042f273dbacb221ed77923f6c8582e22236dc/packages/npm-react/src/index.ts#L209-L210
from react.
Related Issues (20)
- Bug: HOT 6
- Bug: same inline styles are considered different by hydration HOT 1
- Bug: In the unmount function returned by createRoot, an imprecise comparison statement causes the first unmount failed, affecting subsequent program operations. HOT 1
- Bug: Getting 409 Error for CustomPouchError with pouchdb-browser HOT 1
- Bug: [React 18] `act` in tests can alter autobatching behavior compared to production in 18.3.1
- Bug: infinite re-renders when queueing state updates via promises during render
- Bug: Context.Consumer re-rendering children with unchanged context value in react 19. HOT 2
- [Compiler Bug]: Functions defined in render that return primitives don't have usages memoized
- Bug: React 19 - Suspense Siblings Fall Back to Sequential Loading Under Load HOT 1
- Feature Request
- Bug: [React Refresh] React Refresh edge case, class fields are mistakenly treated as React Component
- Bug: Server functions error when returning a client reference
- Bug: Server functions report false positive errors for MobX observables
- Bug: Detached DOM Elements(leading memory leaks) when HTML element removed from DOM HOT 2
- Bug: React date input not working with iOS voiceover HOT 2
- Bug: onSelect does not fire when contentEditable equals "plaintext-only"
- Bug: useOptimistic shows wrong value when other actions happen in the background HOT 1
- [DevTools Bug]: Unnecessary Re-render Highlight on Sibling Component in React DevTools HOT 2
- Bug: "Rendered more hooks than ..." throws when it shouldn't with multiple suspends HOT 2
- [Compiler Bug]: Compiler optimizes away useMemo with manual dependencies HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.