From 4a0da641ba91bdaa753081228485a29739674f39 Mon Sep 17 00:00:00 2001 From: Leslie Zimmermann Date: Fri, 4 Aug 2023 10:50:51 +0200 Subject: [PATCH] docs(react-v18): use react v18 in README code examples --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c5ff3af..20edff7 100644 --- a/README.md +++ b/README.md @@ -349,7 +349,7 @@ Same effect as hitting `enter` (will geocode the text inside of the input). ```jsx import React, {useRef} from 'react'; -import ReactDOM from 'react-dom'; +import ReactDOM from 'react-dom/client'; import Geosuggest from 'react-geosuggest'; const App = () => { @@ -386,7 +386,9 @@ const App = () => { ); }; -ReactDOM.render(, document.getElementById('app')); +const container = document.getElementById('app'); +const root = ReactDOM.createRoot(container!); +root.render(); ``` ## Styling