Shopify’s Hydrogen, a New Take on React – InApps is an article under the topic Software Development Many of you are most interested in today !! Today, let’s InApps.net learn Shopify’s Hydrogen, a New Take on React – InApps in today’s post !

Read more about Shopify’s Hydrogen, a New Take on React – InApps at Wikipedia

You can find content about Shopify’s Hydrogen, a New Take on React – InApps from the Wikipedia website

Shopify has launched a new React-based web development framework, called Hydrogen. It’s open source and available now as a developer preview. Hydrogen is similar to Next.js, perhaps the most popular React framework, only it was built especially for the needs of e-commerce developers. In another twist, Hydrogen was developed on the premise that “commerce needs to be dynamic” — which means the focus is on fast server-side rendering. This reverses the default React approach of client-side rendering.

I spoke with Shopify’s Principal Engineer, Ilya Grigorik, to find out why the company built a custom React framework for its e-commerce customers — and how it fits into the existing JavaScript framework ecosystem.

How Hydrogen Compares to Next.js and Jamstack

 

Richard MacManus

Richard is senior editor at InApps and writes a weekly column about web and application development trends. Previously he founded ReadWriteWeb in 2003 and built it into one of the world’s most influential technology news and analysis sites. Follow him on Twitter @ricmac.

 

In an introductory article, Grigorik described Hydrogen as “a React-based framework optimized for commerce and specialized to be powered by Shopify APIs and infrastructure.” So I began by asking him why existing React frameworks — such as Next.js — were unable to meet their needs?

To answer this, he gave a long explanation of how React frameworks have bifurcated. He first talked about “traditional React,” where “everything is hydrated on the client, everything is done in the client, and you forfeit a lot of performance by doing so because you don’t leverage server-side rendering.” He then compared this to the more recent Jamstack approach, where it’s common to pre-build files and deliver them via edge networks. But this too wasn’t appropriate for Shopify, because “as a [Jamstack] developer, you’re into the really complicated world of frontend development, where all this JavaScript starts to add up and it becomes gnarly and really hard to manage.” He cited A/B testing, which is common in e-commerce, as one example of a developer task that can become overly complex in Jamstack.

Read More:   What It Is, When to Use It, and How to Avoid Its Pitfalls – InApps 2022

“So, we saw a gap,” Grigorik continued, “when we surveyed the existing tools, where it’s really hard — not impossible, but really hard — to get server-side rendering and dynamic commerce working well together.”

Hydrogen, then, is closer to the Jamstack approach than traditional client-side React — except that it aims to make frontend development less complicated. As Grigorik put it, Shopify’s framework helps developers “unlock fast server-side rendering while still having the optionality of A/B testing — and all these things — in a coherent way.”

Why React and Not Web Components?

So if less complexity was required for Shopify developers, why not choose a framework based on web components — a growing web-native approach to creating components in web apps. As independent developer Jared White commented on Twitter, web components would “allow Hydrogen to be used with any JS view library” — not just React.

Grigorik replied that React was simply the most pragmatic choice for Shopify.

“We talked to our merchants, and they told us loud and clear that the majority of them were using React and have easy access to the developer ecosystem of React tools. So that was an obvious and right place to start. We worked together with the React core team to figure out what’s on the horizon, in terms of performance and capabilities, and how it can best apply to commerce. As a result, we’re able to leverage some of their upcoming technology — like React Server Components — and work with them to validate it and actually prove it out on Shopify.”

The Role of React Server Components

React Server Components (RSC) is an experimental feature introduced by the React team at the end of last year. Next.js also makes use of RSC, making it another point of similarity between the two frameworks. Vercel, the company behind Next.js, wrote earlier this year that React Server Components “allow developers to build apps that span the server and client, combining the rich interactivity of client-side apps with the improved performance of traditional server rendering.”

I asked Grigorik how the use of RSC in Hydrogen differs from its use in Next.js?

“We’re big fans of what they’re building,” he said, regarding Vercel and Next.js, “and in many ways the architecture is similar. But they are approaching it from another direction. Vercel is about: build it, push it to the edge, [and] then add layers of dynamic capabilities. We think that given the needs of commerce, we actually need to start with the inverse. Which is, assume everything is dynamic by default, and then expose the right APIs and capabilities to be static.”

Read More:   RailsConf and DHH Go Their Separate Ways – InApps Technology 2022

Although “dynamic by default” is the position Hydrogen takes, that doesn’t mean there isn’t a place for rendering static files in the framework. Indeed, in his introductory article Grigorik wrote, “This is not a debate about dynamic vs. static. You need both.” He noted that “some, or perhaps even substantial parts of some storefronts” can be “cached and served from the edge” (the traditional Jamstack model).

The dynamic-first approach has proven to be the preferred one for Shopify customers, said Grigorik. However, he thinks the key is to give vendors the flexibility to scatter in React’s traditional client-side functionality as needed. Developers also have other options they can tweak, for instance choosing a specific timeframe for caching a certain page.

“Instead of pushing everything to the client, or requiring that you do everything on the server,” Grigorik said, “we’re saying, look, you have the full power of React. If you want to do things that React excels at on the client, be my guest. But at the same time, you have all the niceties of being able to write React code — JavaScript code — that runs on the server.”

React Community Reactions

Finally, since much of the React revolution was driven by client-side rendering and the minimizing of server-side rendering, I wondered how the React community has (ahem) reacted to Shopify’s reversal of this trend?

To answer this, Grigorik referred back to React Server Components, which Shopify has been working on for five months (three of those months in close collaboration with the React team).

“One advantage that we have at Shopify, even compared to let’s say Next.js, is that we’re starting anew. We don’t have an existing ecosystem of apps that we need to move over to this new world of React Server Components.”

Because Shopify customers that choose to use Hydrogen will build their storefronts afresh, using JavaScript, Shopify was “willing to make some more opinionated and forward-looking bets about technology choices,” said Grigorik. So it chose to build around React Server Components and create a “dynamic by default” framework.

Server-Side Is Back… or Is It?

It’ll be interesting to see whether Hydrogen leads to a groundswell of web developers going back to more of a server-side approach, after a number of years where client-side rendering via React was all the rage.

Read More:   JFrog Helps Clean up Bad npm JavaScript with 3 New Tools – InApps Technology 2022

The React team, remember, still sees React Server Components as a work-in-progress. Next.js is certainly experimenting with it, but Shopify has gone even further in its commitment to the approach. It remains to be seen if this new, modern form of server-side rendering can work for a wider range of sites than just e-commerce.

List of Keywords users find our article on Google:

react server components
shopify app
shopify apps
shopify mobile app template
shopify admin
shopify developer jobs
shopify jobs
shopify preview
shopify
mobile app with shopify
react vision
shopify ux
shopify mobile app maker
shopify development
devops reactions
shopify custom fields
ecommerce reactjs template
shopify mobile app
shopify search
hire shopify developer
shopify front end developer
react-search-ui
shopify careers
shopify niche
react ecommerce
shopify news
ilya grigorik
shopify stock
software developer shopify
shopify help
shopify wikipedia
district shopify
shopify apis
shopify work culture
app shopify
shopify contact form software
client server recruitment
working at shopify
shopify code language
privacy policy template shopify
dynamics shopify
shopify ecommerce website templates
shopify food delivery
shopify manager
shopify hydrogen
react rsc
react wikipedia
shopify community
react indeed
shopifyhelp
shopify templating
rsc solutions jobs
appshopify
shopify recruitment
pre market shopify
apps . shopify . com
shopify vision
how to move products around on shopify
partner manager shopify
react portfolio page
shopify custom javascript
shopify twitter
app.shopify
stability approach to selecting the number of principal components
shopify’s
portfolio website with react
shopify react native
shopify travel website
shopify columns
shopify form builder software
shoppify apps
afresh jobs
shopify article template
side by side inverse
server comprares
shopify custom search
template name shopify
hydrogen group jobs
icons shopify
shopify estimated delivery date app
shopify module
shopify post
shopify virtual address
react-native-branch
shopify add js to page
shopify games
shopify partner community
how to write about us page shopify
react native shopify
why do you want to work at shopify
developer shopify
shopify custom fields app
shopify mobile app builder
shopify policy template
apps shopify
next shopify
react front to back 2022
shopify file upload
shopify sales rep
shopify custom field
react icons nextjs
shopify jamstack
coding on shopify
shopify content security policy
a/b testing shopify
jamstack react
mobile app for shopify
react native cached image
shopify app developer
web push for shopify
shopify niche ideas
create shopify mobile app
best mobile app builder for shopify
shopify customer upload file
file upload shopify
next js review
react website templates
shopify icon
trustpilot shopify
react commerce
react server
shopify what is it
react js development company
ecommerce website development company

Source: InApps.net

Rate this post
As a Senior Tech Enthusiast, I bring a decade of experience to the realm of tech writing, blending deep industry knowledge with a passion for storytelling. With expertise in software development to emerging tech trends like AI and IoT—my articles not only inform but also inspire. My journey in tech writing has been marked by a commitment to accuracy, clarity, and engaging storytelling, making me a trusted voice in the tech community.

Let’s create the next big thing together!

Coming together is a beginning. Keeping together is progress. Working together is success.

Let’s talk

Get a custom Proposal

Please fill in your information and your need to get a suitable solution.

    You need to enter your email to download

      [cf7sr-simple-recaptcha]

      Success. Downloading...