rage-framework-example/apps/cef/src/App.tsx
2024-09-30 19:40:58 +01:00

23 lines
512 B
TypeScript

import { fw } from 'rage-fw-cef'
import { useEffect, useState } from 'react'
function App() {
const [data, setData] = useState('')
useEffect(() => {
fw.event.register('customCefEvent', async ([test]) => {
setData(p => p + ' ' + test)
return 'from cef'
})
}, [])
return (
<div style={{ width: '100%', color: 'white', textAlign: 'center' }}>
<h1>Hello World!</h1>
<h2>{data}</h2>
</div>
)
}
export default App