()
| 7 | import { ErrorBoundary, Suspense } from 'solid-js' |
| 8 | |
| 9 | const Example = () => { |
| 10 | const query = useQuery(() => ({ |
| 11 | queryKey: ['test'], |
| 12 | queryFn: async () => { |
| 13 | await new Promise((r) => setTimeout(r, 1000)) |
| 14 | return 'Success' |
| 15 | }, |
| 16 | })) |
| 17 | |
| 18 | return ( |
| 19 | <ErrorBoundary fallback="An error has occurred!"> |
| 20 | <Suspense fallback="Loading..."> |
| 21 | <div>{query.data}</div> |
| 22 | </Suspense> |
| 23 | </ErrorBoundary> |
| 24 | ) |
| 25 | } |
| 26 | |
| 27 | export default function App() { |
| 28 | const queryClient = new QueryClient() |
nothing calls this directly
no test coverage detected