Do people use React to build ecommerce sites? Lot of articles I see advice on that. But as I know React is not good for SEO. SEO is crucial for ecommerce sites. So why do people use react for ecommerce sites? (I know and have used Next.js)

READ LESS
3 upvotes·11.5K views
Replies (1)
Marketer at ITMAGINATION·

React is pretty much the standard nowadays. Companies of all sizes released integrations: the ecommerce ones too. I will bring up Shopify , that released their Hydrogen

There are (arguably) much better tools than React, you are right. There's Svelte (SvelteKit) , Solid.js, and more. They all suffer from morer or less the same issue, though (when it comes to SEO, at least).

The problem is not with React , it's with SPAs. It used to be (and still is sometimes) that search engines' bots wouldn't run JavaScript , meaning they wouldn't see anything on the page. Nowadays, it is said they do load it, but that takes longer than loading the HTML, which is what they are mostly interested in.

So what do you do? You use a static site generator, a prerenderer, a static site, or a server-side rendered site. Next.js does both SSG & SSR, which is why your Next.js sites should rank higher than the plain React sites (assuming the same content & structure).

I hope this answers your question.

READ MORE
5 upvotes·1 comment·15.7K views
Shehan DMG
Shehan DMG
·
March 13th 2023 at 4:36PM

Thanks for the answer!

·
Reply
Avatar of Aleksander Jess

Aleksander Jess

Marketer at ITMAGINATION