import { useEffect } from "preact/hooks";
export default function Test(){
fetch('https://example.com')
.then(res => res.text())
.then(d => console.log(d))
useEffect(() => {
fetch('https://example.com')
.then(res => res.text())
.then(d => console.log(d))
})
return 'hi'
}
import { useEffect } from "preact/hooks";
export default function Test(){
fetch('https://example.com')
.then(res => res.text())
.then(d => console.log(d))
useEffect(() => {
fetch('https://example.com')
.then(res => res.text())
.then(d => console.log(d))
})
return 'hi'
}