Because each operation is isolated, they behave like the component primitive in React and we can group common operations into a shared package. This makes composing a series of common transforms trivial and the syntax is very approachable. With Hydrogen, we want to be an opinionated framework when it matters most, caring about image performance, request caching, and using server-side rendering and React server components to provide non-blocking responses and eliminating client-side waterfalls. We want to provide a developer experience that makes web development fun again. We can inspect for common footguns while using React server components and either guide you to the correct usage or just change the code for you. We also audit your project for accessibility and security, conformance of web vitals and any framework violations. This has been a quick dive under the hood of how we are leveraging compilers with everything from bootstrapping to enforcing best practices, to ongoing maintenance support, and even internal testing. With the Hydrogen CLI, each of these interactions culminates in a powerful and fun developer experience.
Because each operation is isolated, they behave like the component primitive in React and we can group common operations into a shared package. This makes composing a series of common transforms trivial and the syntax is very approachable. There are also some great tools such as astexplorer.net or the Babel Playground that can help you write and visualize AST transforms.
Imagine being able to add a progressive web app support with one command, or for example, if you wrote a transformation that added internationalization with all the appropriate error handling and fallbacks in place. At a basic level, we might import a provider and hook, provide the hook some unique configuration based on your project, and wrap the other app in that provider, passing the result of the hook as a prop. Of course, we would also install the package and all the easy things, but being able to manipulate code in this way can lead to some pretty powerful and creative opportunities.
With Hydrogen, we want to be an opinionated framework when it matters most, but there are certain add-ons in your project that may not make sense for you right at the beginning. Should you decide later that the project requires it, we can provide a turnkey process data down the road and with all the best defaults out of the box. So what are we opinionated about? Well, we care about image performance, request caching, and using server-side rendering and React server components to provide non-blocking responses and eliminating client-side waterfalls. At Shopify, we are passionate about commerce and we want to give the merchant developers on our platform to building blocks to build highly performant storefronts using Hydrogen.
In that world, we are opinionated about the difficult but undifferentiated aspects of development and want to provide a developer experience that makes web development fun again. Think of this as us trying to raise the floor on the area as we can so that you can more easily raise the ceiling within the types of creative and custom commerce experiences you develop. Take React server components. Probably not something you've worked a great deal with yet and perhaps you're not sure about what a component should be client-only, server-only or shared and what primitives are available in each of those. Well, using the same parsing, transforming and generating process I've outlined earlier, we can again walk with you. We can inspect for common footguns while using React server components and either guide you to the correct usage or just change the code for you. We can provide migrations baked directly in the CLI that will automatically look at your project for breaking changes in new versions of Hydrogen and optionally just apply a migration automatically. We also audit your project for accessibility and security, conformance of web vitals and any framework violations. We also use the CLI internally to power our integration tests, generating unique configurations of Hydrogen apps on the fly that we test in headless browsers for breakages. This protects ourselves from releasing new versions with unknown issues, and also has the added benefit of us dogfooding our own tools. So, this has been a quick dive under the hood of how we are leveraging compilers with everything from bootstrapping to enforcing best practices, to ongoing maintenance support, and even internal testing. With the Hydrogen CLI, each of these interactions culminates in a powerful and fun developer experience.
Thanks for watching my talk. And if you have any questions or want to shoot me a message, I'm not so big on social media, but you can find me as kardagram in most places.
Comments