Demo of cancellable suspense components and throttled fetching!

When you scroll down from here, all the blocks start requesting content from a demo API when they come into view. But, if you scroll past the block before the request resolves, the component automatically cancels the request and returns to its previous state. These are cancellable-suspense components. Learn more here.

This is the case for all but the second block, in whose case the request always fails due to a 'Network error'. So you'll see that the second or third time you bring it back into view, its requests get throttled at the client and it doesn't make the request to the API anymore, hence saving the server from a surge of requests it'll have to spend resources rejecting. Learn more about what this can do for youhere.

I'm a placeholder
My requests always fail :(
I'm a placeholder
I'm a placeholder
I'm a placeholder
I'm a placeholder
I'm a placeholder
I'm a placeholder
I'm a placeholder
I'm a placeholder