Replies: 2 comments 3 replies
-
I didn't like this idea at first but I'm coming around. There might be other warnings like this to consider. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This requires more thought and alignment with resource strategy in general. Moving to discussions. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, you can safely read resources or mount lazy components without even using
<Suspense>
however I believe this pattern should be enforced, regardless of whether or not<Suspense>
is optional.The idea is to introduce a utility function much like
enableScheduling
, let's name itenableSuspenseWarnings
, that the user can use to raise warnings for whether a resource has been accessed outside a Suspense boundary.There are other benefits like when using
renderToStringAsync
orpipeToNodeWriteable
, which may force users to use<Suspense>
for the SSR methods to properly render.Beta Was this translation helpful? Give feedback.
All reactions