9 | {error ? (
10 | <>Oh no, there was an error>
11 | ) : isLoading ? (
12 | <>Loading...>
13 | ) : data ? (
14 | <>
15 |
{data.species.name}
16 |

17 | >
18 | ) : null}
19 |
20 | )
21 | }
22 |
--------------------------------------------------------------------------------
/examples/query/react/basic/src/index.tsx:
--------------------------------------------------------------------------------
1 | import ReactDOM from 'react-dom/client'
2 | import { Provider } from 'react-redux'
3 |
4 | import App from './App'
5 | import { setupStore } from './store'
6 |
7 | const store = setupStore()
8 |
9 | const reactRoot = ReactDOM.createRoot(
10 | document.getElementById('root') as HTMLElement,
11 | )
12 | reactRoot.render(
13 |