Skip to content

React18版本需要提示更新 #234

@ZYyyh-cool

Description

@ZYyyh-cool

import { Map,Marker} from '@uiw/react-amap';
使用Map就会提示
Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more
希望能更新下React18版本
使用情况:

function App() {
  return (
    <Suspense fallback={<Spinner />}>
      <APILoader akay="">
            <Map 
             viewMode='3D'
             zoom='11.8'
             center={[10.126,30.236]}
             mapStyle= "amap://styles/darkblue"
             >
            </Map>
      </APILoader>
    </Suspense>
  );
}


const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
      <Provider store={store}>
        <App />
     </Provider>
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions