Fireship · @fireship

Shopify built a JS Framework // Hydrogen First Look

Uploaded November 9, 2021 · Length 5:08

Shopify built a JS Framework // Hydrogen First Look

Summary

Fireship reviews Shopify's new JavaScript framework, Hydrogen, for building custom e-commerce sites with server-side rendering.

  • shopify hydrogen
  • javascript framework
  • server-side rendering
  • e-commerce development
  • react server components

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    just when you thought there wouldn't be

  2. 0:01

    another javascript framework along comes

  3. 0:03

    another javascript framework this one's

  4. 0:05

    called hydrogen and it's a react-based

  5. 0:07

    framework for building custom e-commerce

  6. 0:09

    sites using shopify it's focused on

  7. 0:11

    server-side rendering kind of like next

  8. 0:13

    js but comes with a bunch of pre-defined

  9. 0:15

    components and hooks to manage the data

  10. 0:17

    and ui of a storefront it was just

  11. 0:19

    announced yesterday so let's put it to

  12. 0:20

    the test and see if it's something we

  13. 0:22

    would actually want to use but first

  14. 0:24

    make sure to hit the like button and

  15. 0:26

    subscribe and let me know what you think

  16. 0:27

    about hydrogen in the comments your

  17. 0:29

    first question might be what is the

  18. 0:30

    point of hydrogen we already have next

  19. 0:32

    js and gatsby both of which have

  20. 0:34

    e-commerce templates and then shopify

  21. 0:36

    itself already has a ton of e-commerce

  22. 0:38

    themes so where exactly does hydrogen

  23. 0:40

    come in well if you've ever built an

  24. 0:42

    e-commerce site from scratch you'll know

  25. 0:44

    that it's extremely difficult and that's

  26. 0:46

    why platforms like shopify bigcommerce

  27. 0:48

    and squarespace are very popular but at

  28. 0:50

    the same time when you use a platform

  29. 0:52

    like that your site has a tendency to

  30. 0:54

    feel like a cookie cutter template and

  31. 0:56

    it can be very hard to customize it

  32. 0:57

    enough to break out of that the cool

  33. 0:59

    thing about shopify is that it has a

  34. 1:00

    graphql api allowing you to use it in a

  35. 1:03

    headless way so hydrogen basically

  36. 1:05

    provides a streamlined way to get a

  37. 1:07

    server rendered frontend app up and

  38. 1:08

    running that connects to your shopify

  39. 1:10

    backend with minimal effort in other

  40. 1:12

    words it provides a starting point for

  41. 1:14

    building fully customizable storefronts

  42. 1:16

    it's kind of like the ruby on rails for

  43. 1:18

    shopify development and i only say that

  44. 1:20

    because shopify itself was built with

  45. 1:22

    ruby on rails now let's take a look at

  46. 1:24

    the developer experience the website is

  47. 1:26

    awesome and i actually really like the

  48. 1:27

    name hydrogen it's not as cool as

  49. 1:29

    prometheum but still way better than

  50. 1:30

    arsenic create a new app by running npx

  51. 1:33

    create hydrogen app when you open it

  52. 1:35

    you'll see a project configured with a

  53. 1:37

    lot of stuff here the starter template

  54. 1:38

    it provides you with is definitely

  55. 1:40

    opinionated you'll notice a shopify

  56. 1:42

    config file you can swap out your own

  57. 1:44

    shopify info here to use your own

  58. 1:46

    products the next thing to notice is a v

  59. 1:48

    config file it uses beat as the build

  60. 1:50

    tool which i really like because it's

  61. 1:52

    minimal easy to use and fast it also

  62. 1:54

    comes with tailwind by default which i

  63. 1:56

    think is an interesting choice i like

  64. 1:58

    tailwind but at the same time it's

  65. 1:59

    pretty polarizing and i don't think a