Skip to content

Commit 9b91a45

Browse files
Update code formatting on useTransition.md
1 parent 617065b commit 9b91a45

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/content/reference/react/useTransition.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,15 +1520,15 @@ import { ErrorBoundary } from "react-error-boundary";
15201520
export function AddCommentContainer() {
15211521
return (
15221522
<ErrorBoundary fallback={<p>⚠️Something went wrong</p>}>
1523-
<AddCommentButton />
1523+
<AddCommentButton />
15241524
</ErrorBoundary>
15251525
);
15261526
}
15271527

15281528
function addComment(comment) {
15291529
// For demonstration purposes to show Error Boundary
1530-
if(comment == null){
1531-
throw Error('Example error')
1530+
if (comment == null) {
1531+
throw Error("Example error");
15321532
}
15331533
}
15341534

@@ -1544,9 +1544,10 @@ function AddCommentButton() {
15441544
// so error gets thrown
15451545
addComment();
15461546
});
1547-
}}>
1548-
Add comment
1549-
</button>
1547+
}}
1548+
>
1549+
Add comment
1550+
</button>
15501551
);
15511552
}
15521553
```
@@ -1563,16 +1564,16 @@ export default function App() {
15631564
// TODO: update to import from stable
15641565
// react instead of canary once the `use`
15651566
// Hook is in a stable release of React
1566-
import React, { StrictMode } from 'react';
1567-
import { createRoot } from 'react-dom/client';
1568-
import './styles.css';
1567+
import React, { StrictMode } from "react";
1568+
import { createRoot } from "react-dom/client";
1569+
import "./styles.css";
15691570

15701571
// TODO: update this example to use
15711572
// the Codesandbox Server Component
15721573
// demo environment once it is created
1573-
import App from './App';
1574+
import App from "./App";
15741575

1575-
const root = createRoot(document.getElementById('root'));
1576+
const root = createRoot(document.getElementById("root"));
15761577
root.render(
15771578
<StrictMode>
15781579
<App />

0 commit comments

Comments
 (0)