From 9b91a45ae37d69736eafcab0aed71516f370eb5d Mon Sep 17 00:00:00 2001
From: Matt Carroll <7158882+mattcarrollcode@users.noreply.github.com>
Date: Mon, 6 Nov 2023 14:51:56 -0800
Subject: [PATCH] Update code formatting on useTransition.md
---
src/content/reference/react/useTransition.md | 23 ++++++++++----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/src/content/reference/react/useTransition.md b/src/content/reference/react/useTransition.md
index 672b448b6d1..0689af0e376 100644
--- a/src/content/reference/react/useTransition.md
+++ b/src/content/reference/react/useTransition.md
@@ -1520,15 +1520,15 @@ import { ErrorBoundary } from "react-error-boundary";
export function AddCommentContainer() {
return (
⚠️Something went wrong
}>
-
+
);
}
function addComment(comment) {
// For demonstration purposes to show Error Boundary
- if(comment == null){
- throw Error('Example error')
+ if (comment == null) {
+ throw Error("Example error");
}
}
@@ -1544,9 +1544,10 @@ function AddCommentButton() {
// so error gets thrown
addComment();
});
- }}>
- Add comment
-
+ }}
+ >
+ Add comment
+
);
}
```
@@ -1563,16 +1564,16 @@ export default function App() {
// TODO: update to import from stable
// react instead of canary once the `use`
// Hook is in a stable release of React
-import React, { StrictMode } from 'react';
-import { createRoot } from 'react-dom/client';
-import './styles.css';
+import React, { StrictMode } from "react";
+import { createRoot } from "react-dom/client";
+import "./styles.css";
// TODO: update this example to use
// the Codesandbox Server Component
// demo environment once it is created
-import App from './App';
+import App from "./App";
-const root = createRoot(document.getElementById('root'));
+const root = createRoot(document.getElementById("root"));
root.render(