Is Suspense example in the docs working correctly?
Hey guys, I'm checking out the Suspense example presented in the docs:
https://codesandbox.io/p/sandbox/github/tannerlinsley/react-query/tree/main/examples/react/suspense
However, I don't see any fallbacks working in the example. Is there something I don't understand or is there an issue with the mentioned codesandbox? Thanks in advance.
4 Replies
exotic-emeraldOP•3y ago
Alright, the reason seems to be a lack of fontawesome library in the dependencies, while the classes of this library are used in the Spinner component:
export default function Spinner() {
return (
<span
className="fa fa-circle-o-notch fa-spin"
style={{
marginLeft: 4,
fontSize: 'small',
}}
/>
)
}
Solution:
- add font-awesome library to dependencies
- add the following line to the top of index.jsx file:
import 'font-awesome/css/font-awesome.min.css';like-gold•3y ago
Can you PR a fix please?
exotic-emeraldOP•3y ago
sure, i'll do it today
rival-black•11mo ago
Hi, I was trying to understand how to implement Suspense and was referring to this example. But I don't see the fallbacks working today. Not sure if I'm misunderstanding it?
Update: Ah my bad, found my answer in https://discord.com/channels/719702312431386674/1130651601774850209/1130765374498029578 🙇