#Is it possible to pass Astro component from is:inline Javascript?

8 messages · Page 1 of 1 (latest)

hot breach
#

I am trying to make a search bar in an Astro project. I want to use Ajax to refresh content when user types something in the search bar, and update content which involves an Astro component without reloading the page. Is it possible to achieve this? I am not using any frames works like React or Vue.

prisma depot
#

This is not possible, Astro components are rendered on the server and cannot be used client side inside <script> tags, a UI Framework would probably be easiest

hot breach
#

Thank you.

hot breach
prisma depot
hot breach
#

Thank you!

hot breach
#

Can I call Astro components inside a React component when trying to use Ajax to refresh content?

prisma depot