In README.md it says one way to import when using react (adding { ReactDOM }and has another way in the sample code, but neither works for me. I did find a way that works when creating a tsx file. I don't know if I've done something wrong or maybe the README just needs to be updated...
// COMPILES, but in game gives ERROR: Module not found: "@react"
// import React from '@react';
// COMPILES, but in game gives ERROR: Module not found: "react"
// import React from 'react';
// BUILD ERROR: Module '"@react"' has no exported member 'ReactDOM'
// import React, { ReactDOM } from "@react"
// WORKS!
import ReactNamespace from 'react/index';
declare var React: typeof ReactNamespace;
In README.md it says one way to import when using react (adding
{ ReactDOM }and has another way in the sample code, but neither works for me. I did find a way that works when creating a tsx file. I don't know if I've done something wrong or maybe the README just needs to be updated...