-
-
Save goertzenator/dc9e2c16d2d003de1e2956d40172bc86 to your computer and use it in GitHub Desktop.
htmx in react
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect } from "react"; | |
import htmx from "htmx.org"; | |
import 'htmx-ext-sse/sse.js'; | |
function AtsHome() { | |
useEffect(() => { | |
htmx.process(htmx.find("*")); | |
}, []); | |
return <div | |
hx-get="/h/home" | |
hx-trigger="load" | |
> | |
</div> | |
} | |
export default AtsHome; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
package.json
my dependencies were...The SSE bits are optional of course.