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
