#I can't use the react hook "useEffect()"

21 messages · Page 1 of 1 (latest)

ember abyss
#

You can use react hooks only in react components, not in astro frontmatter

queen wasp
ember abyss
#

Go for what's simplier to do for you

queen wasp
ember abyss
#

You can use astro integration with react so part of Astro page will use react and you can add it as if it was Astro component

queen wasp
ember abyss
#

Layouts? Meaning?

queen wasp
# ember abyss Layouts? Meaning?

Basicly this example for layouts "Astro"



<!doctype html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="description" content="Astro description" />
        <meta name="viewport" content="width=device-width" />
        <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
        <meta name="generator" content={Astro.generator} />
        <title>{title}</title>
    </head>
    <body>
        <slot />
    </body>
</html>

I will use slot

ember abyss
#

Why not

#

Go ahead and try

queen wasp
#

Yeah i try it

#

Its complicate because my full project is in astro layout frontmatter

ember abyss
#

Or, you can make only form in react and the rest in Astro

queen wasp
#

I must switch to react its a dashboard

ember abyss
#

Or, you have dahsboard in Astro, but components in React

#

Do you what suits you best

queen wasp
#

<h1>Test</h1> is not render

left arrow
#

You need to post a stackblitz to get more help here!

queen wasp
#

What is stackblitz