@@ -1520,15 +1520,15 @@ import { ErrorBoundary } from "react-error-boundary";
1520
1520
export function AddCommentContainer () {
1521
1521
return (
1522
1522
< ErrorBoundary fallback= {< p> ⚠️Something went wrong< / p> }>
1523
- < AddCommentButton / >
1523
+ < AddCommentButton / >
1524
1524
< / ErrorBoundary>
1525
1525
);
1526
1526
}
1527
1527
1528
1528
function addComment (comment ) {
1529
1529
// 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" );
1532
1532
}
1533
1533
}
1534
1534
@@ -1544,9 +1544,10 @@ function AddCommentButton() {
1544
1544
// so error gets thrown
1545
1545
addComment ();
1546
1546
});
1547
- }}>
1548
- Add comment
1549
- < / button>
1547
+ }}
1548
+ >
1549
+ Add comment
1550
+ < / button>
1550
1551
);
1551
1552
}
1552
1553
` ` `
@@ -1563,16 +1564,16 @@ export default function App() {
1563
1564
// TODO: update to import from stable
1564
1565
// react instead of canary once the `use`
1565
1566
// 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" ;
1569
1570
1570
1571
// TODO: update this example to use
1571
1572
// the Codesandbox Server Component
1572
1573
// demo environment once it is created
1573
- import App from ' ./App' ;
1574
+ import App from " ./App" ;
1574
1575
1575
- const root = createRoot (document .getElementById (' root' ));
1576
+ const root = createRoot (document .getElementById (" root" ));
1576
1577
root .render (
1577
1578
< StrictMode>
1578
1579
< App / >
0 commit comments