Replies: 5 comments 5 replies
-
Other frameworks such as Vue are also using calling it |
Beta Was this translation helpful? Give feedback.
-
I prefer "suspense", which has been a stable part of React since version 16. Renaming it would cause so much confusion. Naming it anything "loading" would even do it a disservice because a component can suspend for anything: waiting for a worker to proceed, crunching numbers, control flow where a sub tree suspends because i want it to ( From how i use it i couldn't come up with a better name, it describes perfectly what it's for: suspending execution until resumed. "Loading" is very specific, suspense isn't concerned with the "why" and imo shouldn't bear the name of a single use case out of many. |
Beta Was this translation helpful? Give feedback.
-
The name "Suspense" has been growing in me. The major reason I initially found it a scary word was that it literally talked about too much implementation details: "the temporary cessation or suspension of something." It's perhaps accurate but it sounds scary unless you understand how concurrent rendering works. I thought it would be mental block for beginners. I started to change my mind once I realized that the word has another meaning: "a state or feeling of excited or anxious uncertainty about what may happen.", as in "Don't keep me in suspense." So if to most people "suspense" is a common word which means the second one, I'm in support. |
Beta Was this translation helpful? Give feedback.
-
"Suspense" is whimsical. I like it for that. Whimsical names have a way of being very adaptable over time. Two observations I have with the tweet suggested:
|
Beta Was this translation helpful? Give feedback.
-
There's an interesting (probably to no one but us...:D) bit of history there. There are two separate features:
In the original API, the first use case was handled by a When we were releasing 16.6 in 2018, we needed to settle on the name for the first concept. "Suspense" as a brand name already had recognition from the demo so we just went with that. The thinking was that the second feature ("staying on older screen") will be a part of it. But then we ended up changing how the second feature works. It turns out it's not a good default! People don't want to wait for a full screen to be ready to navigate. Actually, you want to show something new as soon as you have something to show. (But you don't want to hide something you're already showing.) That's how the new algorithm works. But the way you opt into "showing existing content while refetching" is by So the concept that originally was called "suspense" ended up being managed via And this is where we are today. :-) |
Beta Was this translation helpful? Give feedback.
-
As brought to my attention by @flybayer: Should the
Suspense
component be renamed?(Source)
What do you all think about this? What are the pros/cons of calling it Suspense, compared to something like LoadingBoundary?
Beta Was this translation helpful? Give feedback.
All reactions