2024-06-13 20:12:40 +00:00
|
|
|
import { fw } from 'rage-fw-cef'
|
2024-06-15 14:41:45 +00:00
|
|
|
import { useEffect, useState } from 'react'
|
2024-06-13 20:12:40 +00:00
|
|
|
|
2024-06-12 22:59:21 +00:00
|
|
|
function App() {
|
2024-06-15 14:41:45 +00:00
|
|
|
const [data, setData] = useState('')
|
|
|
|
|
2024-06-13 20:12:40 +00:00
|
|
|
useEffect(() => {
|
|
|
|
fw.event.register('customCefEvent', ([test]) => {
|
2024-06-15 14:41:45 +00:00
|
|
|
setData(test)
|
|
|
|
return 'response from cef'
|
2024-06-13 20:12:40 +00:00
|
|
|
})
|
|
|
|
}, [])
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<h1>Hello World!</h1>
|
2024-06-15 14:41:45 +00:00
|
|
|
<h2>{data}</h2>
|
2024-06-13 20:12:40 +00:00
|
|
|
</>
|
|
|
|
)
|
2024-06-12 22:59:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default App
|