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.
How Hydrogen Compares to Next.js and Jamstack
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?
“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.”
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.
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.”
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.
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 mobile app template|
|shopify developer jobs|
|mobile app with shopify|
|shopify mobile app maker|
|shopify custom fields|
|ecommerce reactjs template|
|shopify mobile app|
|hire shopify developer|
|shopify front end developer|
|software developer shopify|
|shopify work culture|
|shopify contact form software|
|client server recruitment|
|working at shopify|
|shopify code language|
|shopify ecommerce website templates|
|shopify food delivery|
|rsc solutions jobs|
|pre market shopify|
|apps . shopify . com|
|how to move products around on shopify|
|partner manager shopify|
|react portfolio page|
|stability approach to selecting the number of principal components|
|portfolio website with react|
|shopify react native|
|shopify travel website|
|shopify form builder software|
|shopify article template|
|side by side inverse|
|shopify custom search|
|template name shopify|
|hydrogen group jobs|
|shopify estimated delivery date app|
|shopify virtual address|
|shopify add js to page|
|shopify partner community|
|how to write about us page shopify|
|react native shopify|
|why do you want to work at shopify|
|shopify custom fields app|
|shopify mobile app builder|
|shopify policy template|
|react front to back 2022|
|shopify file upload|
|shopify sales rep|
|shopify custom field|
|react icons nextjs|
|coding on shopify|
|shopify content security policy|
|a/b testing shopify|
|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 what is it|
|react js development company|
|ecommerce website development company|
Let’s create the next big thing together!
Coming together is a beginning. Keeping together is progress. Working together is success.