Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor update of instructions for React 18 #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Minor update of instructions for React 18
peterlau authored Jul 15, 2024
commit e618935e7b0180b414e428d25150a2f2493355c0
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -193,6 +193,8 @@ To get started with Safetest, follow these steps:

```diff
import ReactDOM from "react-dom";
+// If using React 18:
+// import { createRoot } from "react-dom/client";
+import { bootstrap } from 'safetest/react';
import App from "./App";

@@ -209,7 +211,7 @@ To get started with Safetest, follow these steps:
+ element,
+ render: (element) => ReactDOM.render(element, container),
+ // If using React 18:
+ // render: (element) => ReactDOM.createRoot(container).render(element),
+ // render: (element) => createRoot(container).render(element),
+
+ // Add one of the following depending on your bundler...
+