Can react mount global api like vue?

the vue,vue that was used before I just came into contact with react, can be mounted in the following way

import api from "./tool/api"
Vue.prototype.$api = api

try react but block page rendering, is it the wrong method I use, or can"t I do it in the first place? How do you use it if you want to achieve the effect of vue?

Jul.06,2021

can be used like this:

  Context of React  learn about 

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-1b35004-2bf3f.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-1b35004-2bf3f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?