FEATURE REQUEST: Toggle suspense and error boundaries from dev indicator menu. #78344
SnapperGee
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Background
As far as I know, the most convenient way to trigger a suspense and loading boundary without altering code to manually trigger it is by using the ReactDeveloperTools browser plugin to find the boundary component that you want triggered and manually altering its state. This can be pretty tedious when developing and/or testing loading and error components. Being able to just trigger it from the developer icon menu seems like a feature that'd fit in perfectly with it.
Proposal
I imagine being able to walk up a component tree checking for boundaries and creating a toggle to alter the state of the nearest found suspense and/or error boundary could possibly be viable. At least for root boundaries created for an entire route (via a loading and/or error file) this could be a viable approach. As far as nested boundaries go though, I'm not sure how if an implementation like this would work.
As far as contributing goes...well, I do really appreciate and enjoy NextJS and all the features it offers and if I could contribute anything to help improve it, then yes, I'd absolutely love to contribute. But I'm also not familiar with its internal workings nor am I the most experienced developer in general, so I'm not sure how helpful or timely any contributions I attempt to make might be.
Beta Was this translation helpful? Give feedback.
All reactions