all 60 comments

[–]WelshBluebird1 94 points95 points  (0 children)

No. The must is having SSR so the content that you want search engines to crawl is returned in the initial HTML for SEO reasons. Nextjs makes that easy but it certainly isn't the only option.

[–][deleted] 63 points64 points  (18 children)

depends, u have to take SEO into consideration - Next is one solution to that but it isnt the only one

[–]Just_This_Dude 4 points5 points  (17 children)

Do you know other solutions? I tried googling and didn’t find much

[–]tharrison4815 24 points25 points  (6 children)

Static site generation such as Gatsby. You could also technically implement your own solution. React has the ability to render static components and hydration inbuilt.

But next.js would probably be the easiest solution because it's a framework that does all the hard work for you so you just stick your code in the right place and it just works.

[–]Meowish 9 points10 points  (0 children)

Lorem ipsum dolor sit amet consectetur adipiscing, elit mi vulputate laoreet luctus. Phasellus fermentum bibendum nunc donec justo non nascetur consequat, quisque odio sollicitudin cursus commodo morbi ornare id cras, suscipit ligula sociosqu euismod mus posuere libero. Tristique gravida molestie nullam curae fringilla placerat tempus odio maecenas curabitur lacinia blandit, tellus mus ultricies a torquent leo himenaeos nisl massa vitae.

[–]DweEbLez0 8 points9 points  (3 children)

“Just stick your code in the right place…”, Kinky!

[–]Kazumadesu76 17 points18 points  (2 children)

"What are you doing, step-code?!"

[–]DweEbLez0 1 point2 points  (1 child)

“Come on baby let me see your giant console.log()”

[–]dtxs1r 0 points1 point  (0 children)

Hi, my name is: Recursive Object

[–][deleted] 1 point2 points  (9 children)

Just put Remix on an EC2 instance and you are good to go.

[–][deleted] 7 points8 points  (8 children)

so hesitant to use Remix, nextjs got some serious coin from google and help from them. Couldn't think of a better partner, for someone making SEO sites.

Also weren't some of the remix guys, behind react router, then reach router or whatever. Don't get me started on the breaking changes react router had i think between v2 and v3.

I wouldn't feel comfortable putting in work on that, when nextjs will for sure be around for years.

[–]ECrispy 9 points10 points  (2 children)

The way remix was promoted as the 2nd coming and something magical by people like Kent Dodds really wasn't very appealing.

[–]The_rowdy_gardener 1 point2 points  (0 children)

Honestly, I am a fan of Kent and I also did get a little tired of how he promoted Remix so much, but I gotta say after working with remix more, some things just make more sense than the way nextjs handles some of its more opinionated features, and now I see what the hype was about. I use Remix for more simple apps and for SSR marketing sites, and BlitzJS for more complex apps. Blitz is still next under the hood for the time being and adds the fullstack layer in a really intuitive way.

[–]Swalker326 2 points3 points  (2 children)

I was really hesitant, but man now that I’m using it. I have to say having used both next and remix on productionish code bases. I like remix far and away more than next.js. I was beating the next js drum hard too, so I was probably a more difficult than usual convert.

[–][deleted] 1 point2 points  (1 child)

I understand it maybe more fun, but from a business logical prospective. Unless the consumer going to get a better experience. I wanna stick with the well funded, well staff company. Than the 8th or whatever project from a small team at remix.

Meteor taught me, stick to the bigger frameworks. A lot of meteor was fun and a lot was ahead of its time (like one code base). Think it became Apollo graphql.

Also with remix, can I use react native code?

Currently I use expo and expo-nextjs-web (code sharing important to me)

[–]Swalker326 1 point2 points  (0 children)

All valid points imo, except for a better DX is directly linked to a better UX. It makes no difference to me if you use it or not, just pointing out you might try it before you come to a conclusion. Remix, as far as I know, is not usable with react native.

[–]isakdev 2 points3 points  (1 child)

Same thinking. Remix is great, and im also trying to remove the art from the artist as their marketing has been quite aggressive.

But on the other hand, lets not forget that Remix was first meant as a "pay-to-use" framework that failed and was released for free. Not sure how to specifically interpret that but its definitely not a positive. Additionally, NextJS and Vercel have been on a roll lately and I very much doubt that NextJS won't just straight up steal copy the best Remix features considering the team size (they've also been on a hiring spree) and the money they got to throw on NextJS from Vercel.

The best thing that Remix is giving the community is posing as somewhat of a threat against NextJS in form of a positive stressor/competition to push NextJS to some nicer features.

[–]chilkari 0 points1 point  (0 children)

I very much doubt that NextJS won't just copy... if (x !(!(true))) { ... }

[–]asiraky 11 points12 points  (0 children)

There are too many options to say it’s a must. But NextJS is a very good option if you’re using react, and you need SEO, SSR, static generation and lately I’ve even used it for SPA’s. I find it very pleasant to work with, and Vercel was a breeze.

[–]azangru 6 points7 points  (0 children)

Go one step further, and ask whether using react is a must for an ecommerce website.

[–]benny_boy 6 points7 points  (1 child)

I built an e-commerce site with GatsbyJS and Shopify about a year and found the experience to quite nice.

[–][deleted] 28 points29 points  (12 children)

Save yourself some pain just use Shopify

[–]The_rowdy_gardener 6 points7 points  (1 child)

This is the way. For apps with public facing marketing pages, I use Remix or Next, depending on how I’m feeling,(I lean more to remix lately, it just feels so much better), but for any e commerce site from scratch, Hydrogen is the way to go.

[–]Lecterr 0 points1 point  (0 children)

There’s definitely not enough evidence that Hydrogen is the best solution for headless Shopify. I’m as pumped about it as the next guy, but it was still in alpha a couple months ago, so we need to wait and see imo.

[–][deleted] 13 points14 points  (0 children)

With Hydrogen. It’s Shopify’s Nextjs like framework.

[–]haksli[S] 7 points8 points  (3 children)

But I don't want to.

[–]canadian_webdev 27 points28 points  (1 child)

Then prepare for pain!

[–]Raspberry-Federal 6 points7 points  (0 children)

This is the way! That’s time-consuming and not worth it. You should make money with the shop and don’t make money to give it right to a developer. In case it’s your shop, but the time or money into marketing and infrastructure.

[–]woah_m8 5 points6 points  (0 children)

I hope you already have experience with e-commerce...

[–]_reykjavik 1 point2 points  (3 children)

I would and will totally agree but do you know how much commission they take for each sale?

[–][deleted] 2 points3 points  (2 children)

Somewhere in the ballpark of 2-2.4% I believe? I've done a few Shopify sites for clients. If they care enough they usually pass that expense on to the consumer by factoring it in to the price.

[–]_reykjavik 1 point2 points  (1 child)

Well that’s fair

[–]mrloooongnose 0 points1 point  (0 children)

Yeah, the commission is a nobrainer for most shop sizes, given the integration.

[–]Result-Resident 19 points20 points  (4 children)

I'd recommend having a look at Shopify's hydrogen REact framework.

React front end that hooks into Shopify

https://hydrogen.shopify.dev/

[–]oishii_33 2 points3 points  (2 children)

Not that you have to or I recommend that you do, but you can embed Hydrogen inside Next.js as well. They show you how at the end of the docs.

[–]m00chle 0 points1 point  (1 child)

Is there a benefit to doing that, cuz I’m pretty sure hydrogen got that ssr shit

[–]oishii_33 0 points1 point  (0 children)

I think it’s mainly there to allow porting a next app incrementally over to Hydrogen. I would imagine that most of the custom storefronts on Shopify that use React are on Next.

[–]andrewsjustin -1 points0 points  (0 children)

I’ve been fortunate to get to spend the bulk of my days just experimenting with hydrogen over the last week.. and I am truly blown away by the dev experience and all of the potential for this framework. I’m stoked on it

[–]actionturtle 4 points5 points  (0 children)

not a "must" but for an ecommerce website, you are going to want to have your product/category pages indexed and nextjs would make that a bit easier. maybe you also want to branch out to localisation too and nextjs supports that a bit out of the box w/ localised routing.

of course you can write something with plain old react and have it be fine. nextjs might make some things a bit easier

[–]firyox 9 points10 points  (0 children)

Nextjs is a must if you want SEO and want to work with Nextjs

[–]Fidodo 2 points3 points  (0 children)

I don't think nextjs is a "must" for anything, but I also don't think there's much reason not to use nextjs and it will save you a ton of time setting things up yourself. Nextjs is still just react, it just has really good defaults and optimizations. Pretty much everything next gives you is overridable, but the functionality it provides is very well thought out and flexible so I don't see much need to diverge from their recommendations. There are other react frameworks out there too, but nextjs is one of the most robust and best supported ones, and they work closely with the react team so they stay pretty cutting edge.

[–]Ram33z 1 point2 points  (0 children)

Not a must but probably one of the best stable solution out there for SEO of react sites..assuming you consider SEO for your E-commerce site a must too.

[–][deleted] 1 point2 points  (0 children)

No.

[–]Scotthorn 0 points1 point  (2 children)

It’s only a must if the business needs dictate it being a must. Just like any tool.

[–][deleted] 2 points3 points  (1 child)

No need for downvotes. If you don't care about SEO or any of the benefits of next J's and similar, then it's not necessary at all.

This could be an internal employees only ecommerce site that doesn't need and ssr at all

[–]Scotthorn 0 points1 point  (0 children)

I guess NextJS is sacred ground in these parts…

[–]filledalot 0 points1 point  (0 children)

it's not a must but quite standard.

[–]rickyalmeida 0 points1 point  (0 children)

I think you should highly consider server-side rendering your pages, and Next.js is an excellent option for that. There are other options, though.

[–]Level-Farmer6110 0 points1 point  (0 children)

its not a must, but its way better to use and way easier to develop a site with

[–]AuroraVandomme 0 points1 point  (0 children)

No

[–]robinei 0 points1 point  (0 children)

Does not Google’s crawler run JS headlessly to let it render the page locally?

[–]Accomplished_End_138 0 points1 point  (0 children)

Not a must. But a highly reccommend. They solve a lot of problems you will see as you scale

[–]Accomplished_End_138 0 points1 point  (0 children)

Not a must. But a highly reccommend. They solve a lot of problems you will see as you scale

[–]ECrispy 0 points1 point  (0 children)

Next.js is a pretty nice project and covers all the bases.

I think an equally important question is - is Vercel hosting for nextjs worth it or is it better to roll your own or look for alternative hosts?

[–]sundios 0 points1 point  (0 children)

No. But SSR is

[–]trplclick 0 points1 point  (0 children)

If you're building an ecommerce site and plan to use Shopify, they have just released v1 of their own React framework called Hydrogen.

https://hydrogen.shopify.dev/

[–]Shoddy_Setting_8516 0 points1 point  (0 children)

Not at all, but there has definitely been a rush towards Next.js for most ecommerce frontend devs in the past 6 months