|
@ -126,7 +126,7 @@ The `useTransition` hook returns two values in an array. |
|
|
**If some state update causes a component to suspend, that state update should be wrapped in a transition.** |
|
|
**If some state update causes a component to suspend, that state update should be wrapped in a transition.** |
|
|
|
|
|
|
|
|
```js |
|
|
```js |
|
|
const SUSPENSE_CONFIG = {timeoutMs: 2000 }; |
|
|
const SUSPENSE_CONFIG = { timeoutMs: 2000 }; |
|
|
|
|
|
|
|
|
function App() { |
|
|
function App() { |
|
|
const [resource, setResource] = useState(initialResource); |
|
|
const [resource, setResource] = useState(initialResource); |
|
|