Skip to content

react

3 posts with the tag “react”

Thinking in Astro, Coming from React

Astro sites allow you to use React, but they aren’t React, themselves. Understanding the differences between React and Astro can help you get started more quickly, so here are some thoughts on how to think like an Astro-naut!

Getting started with React components in Astro

Yes, you can write and render your React components in your Astro page. But remember, Astro isn’t React, and you might be getting error messages when you totally know your React component should work. It’s not complicated to establish the Astro-React relationship, but you might not be used to doing these things…

Rewriting a React Component as an Astro Component

I’d been using a lot of components in my Astro blog, but I realized that they were almost all React components, because that’s what I know. So, I wanted to try reproducing some functionality by replacing a React component with a corresponding Astro component.