r/reactjs • • 17h ago

reactques

Would React with selective hydration or a framework like Astro be worth considering here? I'm wondering if using React only for the parts that actually need interactivity, while keeping the rest lightweight, could be a good balance for low-end devices. Curious what more experienced developers think about this approach.

0 Upvotes

4 comments sorted by

2

u/otheyhigh 16h ago

I believe this was how React started (a library vs a framework)

Do not see any harm in using React for only parts of the application. But it does require proper handling around hydration and rendering in general.

Might want to take a step back and consider the two approaches. It might just be less complex, lower LOE and more robust to use React for the entire application.

(Edit) These are just my 2 cents and I would not call myself an experienced developer. Better to wait and see what others have to say about your use case.

1

u/Otherwise-Leather965 13h ago

Astro with React islands is a good fit if most of the page is content, since only the interactive bits ship any JS. If the app is mostly interactive, like a dashboard, you end up hydrating nearly everything anyway, so plain React with code splitting is simpler to maintain.

1

u/Sammytheherald 13h ago

Yeah, that's actually one of the best use cases for Astro. If most of your site is static content with a few interactive pockets like a filterable list, cart, or form, Astro's islands architecture lets you ship zero JavaScript for everything else and only hydrate those specific React components when they load or scroll into view. On low-end phones, skipping unnecessary JS parsing and hydration makes a huge difference in how snappy the page feels.

React's selective hydration with Suspense is still helpful if your whole page is genuinely an interactive app, since it prioritizes hydrating whatever the user is interacting with first. The catch is you're still shipping the React runtime and hydrating the rest of the tree in the background anyway.

The main trade-off comes down to how connected your interactive parts are. If you have a bunch of components sharing global state or you're building something that feels like a full dashboard with client-side navigation, sticking with React or Next.js is way less headache than trying to sync state across separate Astro islands. But for content-heavy sites targeting budget devices, Astro with React islands is hard to beat.