Using Amap, map is not defined in react

I currently copy it according to Gao de document . I quote it globally in index.html, and then I will report this prompt. It is normal for me to use the function in api. I would like to ask whether I need to change the way I quote api, or where is the problem? thank you.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title> </title>
    <link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css" />
    <!-- API -->
    <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.6&key=key"></script>
    <script type="text/javascript" src="https://cache.amap.com/lbs/static/addToolbar.js"></script>
    <!-- API -->
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>

</head>

<body>
    <div id="root"></div>
</body>

</html>


Mar.20,2021

addToolbar.js this seems to be useless, just comment it out. --

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35d9b-2b743.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35d9b-2b743.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?