flat-state-13182
09/01/2022, 3:25 PMoptions.tsx
file into my project it creates a blank page.
The console logs for the option page show that there is an issue importing React, so I guess this is another issue caused due to my particular project setup using a relative import for react in my package.json
, but it would be nice to work around it somehow.sticky-dress-98131
09/01/2022, 3:26 PMflat-state-13182
09/01/2022, 3:27 PMindex.tsx:6 Uncaught ReferenceError: React is not defined
at daMDB.../../../src/options/index.tsx (index.tsx:6:13)
at newRequire (options.9d5b440f.js:71:24)
at options.9d5b440f.js:122:5
at options.9d5b440f.js:145:3
flat-state-13182
09/01/2022, 3:28 PMindex.tsx
file, which is just a copy of the example.
ts
import { useState } from "react"
function OptionsIndex() {
const [data, setData] = useState("")
return (
<div>
<h1>
Welcome to your <a href="https://www.plasmo.com">Plasmo</a> Extension!
</h1>
<h2>This is the Option UI page!</h2>
<input onChange={(e) => setData(e.target.value)} value={data} />
</div>
)
}
export default OptionsIndex
flat-state-13182
09/01/2022, 3:29 PMts
import React, { useState } from "react"