How to convert the designer extension scaffold example to react?

I want to use react instead of vanilla js. However, I can’t access the webflow object when running my react app locally in webflow. Any suggestions would be appreciated.

Check out this starter template: GitHub - stefanwittwer/webflow-app-template-react: Template for a Webflow App (designer extension) using React and Vite