Logo
    Search

    Hasty Treat - React Server Side Rendering

    enOctober 21, 2019

    Podcast Summary

    • Server-side rendering: generating HTML on the serverSSR improves performance, SEO, and user experience. Implement with frameworks like Next.js or Gatsby, handle XHR requests differently, and consider for Redux.

      Server side rendering (SSR) is a technique used in web development to render the HTML of a webpage on the server instead of the client. This approach can offer improved performance, SEO benefits, and a smoother user experience. SSR can be implemented with client libraries like React by using server-side frameworks such as Next.js or Gatsby. However, it's important to note that XHR requests need to be handled differently in an SSR environment. Additionally, if using Redux, there is an extra step required. Not all React frameworks support SSR, so it's essential to consider this when choosing a framework for your project. Sentry, a sponsor of this episode, is a powerful tool for tracking and logging bugs and exceptions, making it an invaluable resource for developers dealing with errors in their codebase. And if you're looking for a job, Sentry is hiring!

    • Enhancing SEO and improving page load speed with Server Side RenderingSSR pre-renders pages on the server and sends fully rendered HTML to clients, improving SEO and reducing page load times compared to CSR.

      Server Side Rendering (SSR) is a crucial technique for rendering web applications, particularly for enhancing Search Engine Optimization (SEO) and improving page load speed. Traditionally, rendering involved generating HTML on the server and sending it to the client. However, with modern JavaScript applications, an empty HTML file is initially sent, and the JavaScript loads and renders the app on the client, a process known as Client Side Rendering (CSR). The primary reason for using SSR is to cater to web crawlers, which cannot render client-side applications effectively. This can negatively impact SEO and search engine rankings. Google, for instance, crawls and renders both server and client-side applications, but the results are not optimal for client-side-only applications. To ensure good SEO, it's essential to provide search engines with fully rendered content. Another advantage of SSR is faster page load times. With CSR, the client must make multiple round trips to the server to fetch and render the page. In contrast, SSR allows the server to render the page and send it to the client as a fully rendered HTML document, reducing the number of requests and improving overall load times. Frameworks like Gatsby and Next.js facilitate SSR by pre-rendering pages on the server and serving them to the client, ensuring a faster and more SEO-friendly web experience.

    • Server Side Rendering (SSR) vs Client Side Rendering (CSR) and RehydrationSSR is important for SEO and crawlability, while CSR is better for interactive client-side apps. Rehydration allows SSR React apps to become CSR, but can have challenges. Services like Prerender.io can help improve performance. Next.js and Gatsby are platforms for server-side rendering in React, with different capabilities.

      Server Side Rendering (SSR) and Client Side Rendering (CSR) serve different purposes in web development. SSR is useful when a robot or non-human entity needs to access and understand the content of a webpage, as it allows the server to render the HTML that can be easily crawled by search engines and web crawlers. This is particularly important for SEO. On the other hand, CSR is more suitable for creating interactive client-side applications. Rehydration is a technique used to convert a server-rendered React application into a client-side application. This process involves sending a big string of HTML from the server to the browser and then "rehydrating" the React components with the client-side JavaScript. However, this process can come with challenges, especially when the structure of the server-side and client-side versions of the application don't match. There are also services like Prerender.io that can help improve the performance of client-side frameworks by pre-rendering the HTML and serving it to users, reducing the time it takes for the page to load. When it comes to React specifically, there are platforms like Next.js and Gatsby that can be used for server-side rendering. Next.js can render React applications both at build time and on runtime, while Gatsby focuses more on static site generation. Understanding the differences between these platforms and their capabilities is essential for choosing the right one for your project.

    • Choosing between static site generation and server-side rendering for React applicationsFor static sites, SSG is faster and generates HTML files once. For dynamic content, SSR is necessary but comes with added complexity and potential gotchas, such as the absence of a window object and incompatibility with hooks like useLayoutEffect.

      When it comes to building React applications, the choice between static site generation (SSG) using a tool like Gatsby or Next.js for server-side rendering (SSR) depends on the specific needs of your project. For static content or brochure-type sites, SSG is ideal as it generates HTML files once and sends them directly to the client for faster load times. However, for applications with frequently updated data or user-authenticated content, SSR using a build tool like Webpack or Parser might be necessary, but it comes with added complexity and potential gotchas. One such challenge is the absence of a window object in Node.js, which is used for browser-side JavaScript. This can cause issues when using certain browser-specific APIs or libraries, so it's recommended to avoid window-specific functions and instead use their server-side equivalents. Another gotcha is the use of hooks like useLayoutEffect, which waits for the DOM to finish loading and doesn't make sense in a server-side context, resulting in an error when attempted. Overall, while SSR and SSG offer different benefits, it's essential to understand the trade-offs and potential challenges to ensure a successful implementation for your React project.

    • Handling isometric layout effects and data fetching challenges in Next.jsUse `useIsometricLayoutEffect` for isometric layout issues in testing, fetch data at the component level, and wait for promises with tools like crawlers. Suspense in React may simplify data loading in the future.

      Developing Next.js applications involves solving various challenges, such as handling bugs related to isometric layout effects and data fetching. Regarding the former, using `useIsometricLayoutEffect` can help prevent errors caused by Jest testing, which often trigger this specific bug due to running tests via Node. For data fetching, it's essential to fetch data at the component level rather than the page level. However, this can be challenging, and tools like crawlers are required to bring promises up to the page level and wait upon them. Suspense in React is expected to simplify data loading in the future by allowing higher-level pages to know when their children's resources are not yet ready, enabling better handling of data fetching and resource loading. Additionally, the speaker reminisced about a game show where contestants could grab as many toys as possible, expressing a wish to have experienced it as a child.

    • Rendering React with server-side dataPatience and helpful libraries like Apollo are key to successfully rendering React applications with server-side data. Overcome challenges like code splitting and authentication by using tools like 'renderToStringWithData' and moving from local storage to cookies.

      Rendering a React application with server-side data can be a complex process, but with the right tools, it can be made easier. The speaker had trouble getting SSR, code splitting, and data to work together using React Loadable, but found success with Apollo's "renderToStringWithData" function. Additionally, there are other client-side features, such as fetch and local storage, that cannot be used during server-side rendering, which can pose challenges for developers. The speaker mentioned the need to fix this issue by moving from local storage to cookies for authentication, but noted that it's a common challenge for those working with React and server-side rendering. Overall, the process of rendering a React application with server-side data requires patience and the use of helpful libraries and tools to overcome potential obstacles.

    • Managing data fetching and rendering in SSR with Next.js and ApolloUse 'Next with Apollo' for easier data fetching management and 'no SSR' components for specific parts that shouldn't be rendered on the server.

      When implementing Server Side Rendering (SSR) with frameworks like Next.js and libraries like Apollo, it's essential to consider which parts of your application should be rendered on the server and which parts can be rendered on the client. This process can help prevent code breaking on the server. To simplify this process, tools like "Next with Apollo" and "no SSR" components exist. "Next with Apollo" is a high order component that makes it easier to manage data fetching levels. "no SSR" components, on the other hand, allow wrapping any component that shouldn't be rendered on the server, making it a useful strategy when dealing with third-party libraries or specific parts of the application. By using these tools, developers can step-by-step transition an application from primarily client-side rendered to server-side rendered, minimizing potential issues and making the process more manageable.

    • Exploring a higher order component for handling SSR in ReactSpeakers discussed a reusable component to handle server-side rendering in React, with ease of use as an advantage but requiring a 'typeof window' check as a downside. They also looked forward to React Suspense for simplifying SSR further.

      During their discussion, the speakers explored the concept of a higher order component for handling server side rendering (SSR) in React. This component checks if the current environment is server-side or client-side, and renders or passes through components accordingly. The speakers also mentioned the possibility of using this as a hook, but weren't certain. The main advantage of using such a component is its ease of use and reusability. However, a downside is the need to check for the existence of the 'window' variable, which requires typing 'typeof window !== "undefined"' every time. Despite this, the speakers recommended copying and pasting the code instead of installing it as a package. They also expressed excitement for the upcoming React Suspense feature, which they believe will simplify server side rendering even further. They concluded by inviting listeners to check out Syntax.fm for more information on React Suspense and related topics.

    Recent Episodes from Syntax - Tasty Web Development Treats

    790: State of JS 2023 Reactions

    790: State of JS 2023 Reactions

    Scott and Wes dive into the 2023 State of JavaScript survey, breaking down the latest trends and pain points in front-end frameworks, build tools, and JavaScript runtimes. Tune in for their hot takes and insights on what’s shaping the JavaScript landscape this year!

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    789: Do More With AI - LLMs With Big Token Counts

    789: Do More With AI - LLMs With Big Token Counts

    Join Scott and CJ as they dive into the fascinating world of AI, exploring topics from LLM token sizes and context windows to understanding input length. They discuss practical use cases and share insights on how web developers can leverage larger token counts to maximize the potential of AI and LLMs.

    Show Notes

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    CJ: X Instagram YouTube TwitchTV

    Randy: X Instagram YouTube Threads

    788: Supabase: Open Source Firebase for Fullstack JS Apps

    788: Supabase: Open Source Firebase for Fullstack JS Apps

    Scott and CJ chat with Paul Copplestone, CEO and co-founder of Supabase, about the journey of building an open source alternative to Firebase. Learn about the tech stack, the story behind their excellent documentation, and how Supabase balances business goals with open-source values.

    Show Notes

    • 00:00 Welcome to Syntax!
    • 00:30 Who is Paul Copplestone?
    • 01:17 Why ‘Supa’ and not ‘Super’?
    • 02:26 How did Supabase start?
    • 08:42 Simplicity in design.
    • 10:32 How do you take Supabase one step beyond the competition?
    • 12:35 How do you decide which libraries are officially supported vs community maintained?
      • 15:17 You don’t need a client library!
    • 16:48 Edge functions for server-side functionality.
    • 18:51 The genesis of pgvector.
    • 20:59 The product strategy.
    • 22:25 What’s the story behind Supabase’s awesome docs?
    • 25:26 The tech behind Supabase.
    • 35:46 How do you balance business goals with open source?
    • 42:01 What’s next for Supabase?
    • 44:15 Supabase’s GA + new features.
    • 48:24 Who runs the X account?
    • 50:39 Sick Picks + Shameless Plugs.

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    CJ: X Instagram YouTube TwitchTV

    Randy: X Instagram YouTube Threads

    787: You Should Try Vue.js

    787: You Should Try Vue.js

    Scott and CJ dive deep into the world of Vue.js, exploring what makes this frontend framework unique and why it stands out from React and Svelte. CJ gives a comprehensive tour, covering everything from getting started to advanced features like state management and Vue’s built-in styles.

    Show Notes

    Vue.js: The Documentary.

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    786: What Open Source license should you use?

    786: What Open Source license should you use?

    Scott and CJ dive into the world of open source, breaking down its meaning, benefits, and the various types of licenses you’ll encounter. From permissive licenses like MIT and Apache 2.0 to copy-left licenses such as GNU GPLv3, they’ll help you choose and apply the right license for your project.

    Show Notes

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    785: What’s Next for NextJS with Tim Neutkens

    785: What’s Next for NextJS with Tim Neutkens

    Scott and Wes dive into the world of Next.js with special guest Tim Neutkens from Vercel. They explore the latest updates, including the React Compiler and React Server Components, discussing their impact on developer workflows and the future of Next.js development.

    Show Notes

    • 00:00 Welcome to Syntax!
    • 00:30 What does the React Compiler do?
    • 05:04 Will React Compiler help with managing Context?
    • 06:39 What happens if you’re not using a React Compiler?
    • 09:30 Will this work on any NextJS version?
    • 12:18 What are React Server Components?
    • 16:28 Shipping all the data inside an encapsulated component.
    • 20:17 Clearing up the frustrations around retrofitting server components.
    • 23:13 Handing migration.
    • 28:30 Is this just a fetch request with props?
    • 36:41 How closely are the NextJS and React teams working?
    • 41:53 Will we ever get Async Client Components?
    • 43:52 Async Local Storage API.
    • 45:31 Turbopack.
    • 57:51 Sick Picks & Shameless Plugs.

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    784: Logging × Blogging × Testing × Freelancing

    784: Logging × Blogging × Testing × Freelancing

    In this Potluck episode, Scott and Wes tackle listener questions on modern blogging, website environmental impact, and using LangChain with LLMs. They also cover CSS hyphens, unit vs. integration testing, and balancing web development with new parenthood.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    783: How We Built a Netflix Style “Save for Offline” Feature Into Syntax

    783: How We Built a Netflix Style “Save for Offline” Feature Into Syntax

    Scott and Wes dive into the world of browser caching for audio files, exploring the File System API and the Cache API. They discuss size restrictions across different browsers, how tools like Riverside.fm leverage IndexedDB, and walk through code examples for creating, retrieving, and managing cached audio data.

    Show Notes

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott:X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    782: The Developer’s Guide To Fonts with Stephen Nixon

    782: The Developer’s Guide To Fonts with Stephen Nixon

    Scott and CJ are joined by Stephen Nixon of ArrowType to delve into the world of fonts and type for developers. They explore the intricacies of font creation, the utility of variable fonts, and offer tips for making visually appealing typography on the web.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott:X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    781: Potluck - The Value of TypeScript × Vue vs Svelte × Leetcode

    781: Potluck - The Value of TypeScript × Vue vs Svelte × Leetcode

    In this potluck episode of Syntax, Scott and CJ serve up a variety of community questions, from the nuances of beginner vs. advanced TypeScript to the pros and cons of SvelteKit. They also discuss falling out of love with React, shipping private packages via NPM, and the eternal struggle of always starting but never finishing projects.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott:X Instagram Tiktok LinkedIn Threads

    Randy: X Instagram YouTube Threads

    Related Episodes

    Hasty Treat - Why Use a Frontend Framework at All?

    Hasty Treat - Why Use a Frontend Framework at All?

    In this Hasty Treat, Scott and Wes talk about frontend frameworks — what they are, when you need one, how to organize your code for maximum efficiency, and more!

    Stackbit - Sponsor

    Build modern JAMStack websites in minutes. Stackbit lets you combine any theme, site generator and CMS without complicated integrations. Join the beta today by visiting stackbit.com/syntaxfm.

    Show Notes

    3:08 - What is a frontend framework?

    • JavaScript based
      • Controls applications such as:
        • Routing
        • Rendering
        • Data Fetching
      • Examples:
        • React
        • Angular
        • VueJS
        • Ember
        • Backbone
        • Svelte

    5:54 - When to use a frontend framework

    • The Link between your JavaScript data and the DOM (your HTML) isn’t live
    • The use of frameworks makes re-updating the DOM (after the initial variable update) easy
    • You need an opinionated way to handle complexity
      • Example:
        • You add an item to a shopping cart, send the event to the backend, and update both the number of items in the cart and the “Add to cart” button
        • Event Handlers - binding and un-binding
    • Your client wants a fast, modern experience
    • Seamless routing and page transitions
    • Fast prototyping
    • Access to battle-tested libraries
      • Security
      • Perf

    14:24 - When not to use a frontend framework

    • When using CMS like WordPress and Drupal
    • A medium amount of JavaScript is needed - Vanilla JS will work fine
      • Modals
      • Slideshows
      • Form submits
    • Static pages, no JS functionality
    • Updating an existing project

    17:20 - Why can’t I just use jQuery?

    • Vanilla JS contains all of jQuery’s available DOM APIs
    • Frameworks provide structure
    • Organizes code for big projects

    Links

    Tweet us your tasty treats!

    From React To SvelteKit

    From React To SvelteKit

    In this episode of Syntax, Scott talks with Wes about moving Level Up Tutorials from React to SvelteKit — why he did it, how, benefits, things to watch out for, and more!

    Prismic - Sponsor

    Prismic is a Headless CMS that makes it easy to build website pages as a set of components. Break pages into sections of components using React, Vue, or whatever you like. Make corresponding Slices in Prismic. Start building pages dynamically in minutes. Get started at prismic.io/syntax.

    Sentry - Sponsor

    If you want to know what’s happening with your code, track errors and monitor performance with Sentry. Sentry’s Application Monitoring platform helps developers see performance issues, fix errors faster, and optimize their code health. Cut your time on error resolution from hours to minutes. It works with any language and integrates with dozens of other services. Syntax listeners new to Sentry can get two months for free by visiting Sentry.io and using the coupon code TASTYTREAT during sign up.

    Cloudinary - Sponsor

    Cloudinary is the best way to manage images and videos in the cloud. Edit and transform for any use case, from performance to personalization, using Cloudinary’s APIs, SDKs, widgets, and integrations.

    Show Notes

    07:28 - Thoughts

    • Apples to oranges, so unfortunately, no super legit ability to compare.
      • SvelteKit isn’t analogous with a custom React setup that uses CSR
        • SSR is usually going to be faster - we can ship less JS
        • Some big things changed beyond React → SvelteKit
        • HLS starts grabbing chunks immediately, so it’s hard to get accurate load time and transfer.
    • Whole conversion took a couple of months.
    • Hardest part was making UI choices and changes, straight up converting components one by one wasn’t actually that tough

    16:14 - Converting React components to Svelte

    • useState becomes just a straight-up variable
    • Graphql calls were hooks now just imported generated functions
    • Remove extranous fragments
    • Convert {things && } to {#if thing}{/if}
    •  becomes 

    24:06 - Spark joys

    • State
      • Our checkout flow became way more transparent, way easier with Svelte stores
    • Render flow
      • Was never something we needed to really think about. Didn’t think about memoizing, or worrying about too many renders down the line, just never needed to
    • Overall developer experience
      • It’s honestly a joy to work in and I don’t want to go back
    • Making a library
    • Creating a sitemap was extremely easy, because of server-side routes. file.returnformat.ts ie sitemap.xml.ts
    • CSS without a css-in-js library for scoping is a dream. CSS props are now 100% via CSS variables using the https://svelte.dev/docs#style_props
    • Animations are all done with Svelte’s internal animations lib

    32:45 - Hosting

    • adapter-node
    • Hosted on render.com as a straight-up node process $7/m for more than enough RAM and CPU,
    • Lots of other options for static, Vercel, workers whatever, I like having just a straight-up node app you can host anywhere

    35:50 - Things to do

    • Admin tools

    37:00 - Challenges

    • ESM is not always smooth sailin
      • Import has from ‘lodash/has’ didn’t working in dev, but import has from ‘lodash/has.js’ didn’t work in prod.
        • Solution was to use lodash.has as the dependency
        • Apollo included all React as a dep unless you import from @core
    • TS is great, but there was once where I wanted to define the entire props ts object for a spread prop, but was not possible
    • Drag animations

    Cloudinary

    42:46 - Wes’ questions

    • What about the ecosystem?
    • What about forms + DOM data?
    • Serverless functions?
    • Do you always bind to state? Or just access directly?
     formData = writable({   title: "yo" })  {$formData.title}    

    Links

    ××× SIIIIICK ××× PIIIICKS ×××

    Shameless Plugs

    Tweet us your tasty treats!

    Our Predictions for 2023

    Our Predictions for 2023

    In this episode of Syntax, Wes and Scott talk about their predictions in web development for 2023.

    Show Notes

    • 00:07 Welcome
    • 01:25 SSR JS sites more the norm
    • 03:32 React doing forms
    • 05:39 TypeScript Inferred becomes hot
    • 08:11 Deno gets hotter
    • 12:51 JS Runtimes Mature
    • HTMX
    • 15:00 We will see a new TS Type Checker written in Rust
    • 19:20 New JS APIs
    • 23:37 Writing towards Winter CG Spec Popular. “Worker Ready” script
    • STC
    • 27:05 A new JS framework
    • SolidJS
    • Qwik
    • 29:44 Page Transitions API
    • 32:40 Scott was right / Scotts gonna be right
    • 34:06 Rust becomes more Popular
    • 36:00 React Beta Docs launch after 5 year dev cycle
    • 37:45 CSS Container Queries in Production
    • 41:07 Svelte and Sveltekit Glow Up
    • 43:38 CSS Subgrid
    • 49:19 WASM
    • 51:51 AI
    • Open AI
    • 53:16 Houdini
    • 54:30 People souring on React, Eslint
    • 57:47 Machine learning
    • 01:08 SIIIIICK ××× PIIIICKS ×××

    ××× SIIIIICK ××× PIIIICKS ×××

    Shameless Plugs

    Tweet us your tasty treats

    Gatsby vs Next.js in 2021

    Gatsby vs Next.js in 2021

    In this episode of Syntax, Scott and Wes talk about Gatsby vs Next. A lot has changed in the last year — what are the differences, and do the recommendations from Syntax 120 still hold true?

    Sanity - Sponsor

    Sanity.io is a real-time headless CMS with a fully customizable Content Studio built in React. Get a Sanity powered site up and running in minutes at sanity.io/create. Get an awesome supercharged free developer plan on sanity.io/syntax.

    Sentry - Sponsor

    If you want to know what’s happening with your errors, track them with Sentry. Sentry is open-source error tracking that helps developers monitor and fix crashes in real time. Cut your time on error resolution from five hours to five minutes. It works with any language and integrates with dozens of other services. Syntax listeners can get two months for free by visiting Sentry.io and using the coupon code “tastytreat”.

    Show Notes

    03:34 - Server-rendered

    • Both do server rendered
    • Gatsby is gone at build time
    • Next is done at build and on deploy

    05:26 - Static generation

    • getStaticProps()
    • getServerSideProps()

    08:25 - Re-rendering pages

    • Gatsby can be re-rendered and re-deployed - any CMS lets you do this on only the pages that changed.
    • Gatsby-cloud
    • Next.js has the revalidate flag that will re-render when stale

    18:54 - Data management

    • Gatsby has a built in GraphQL API feature with
    • Next.js has nothing - it’s not their problem. Use Apollo, or SWR, React Query, or redux, or whatever you want.

    23:16 - Client-side data

    • Neither do anything, next.

    26:33 - Dynamic Pages

    • List of 100 shoes, each one gets a page
    • List of four types of shoes: basketball, runners, casual, bowling, etc.
    • List of 10 colors: each color gets its own page.
    • List of 12 sizes, each size gets its own page.
    • Now it gets complicated when you do this:
      • Show me basketball shoes, in red, in size 5
      • 600 pages minimum
      • What about size 6+7?
      • Then you get into having to fetch data on the client side - but all your data is in GraphQL?!
      • The queries are different!
    • Gatsby will get “Hosted GraphQL”: https://twitter.com/kylemathews/status/1252803849775009794

    30:41 - Routing

    • Neither do nested routing still
    • Both do folder based wrapper

    34:50 - Hosting

    • Anywhere

    35:54 - Images

    46:20 - Server or Serverless

    • Gatsby - none. You can do it with Netlify, Begin, AWS, Gatsby doesn’t care.
    • Next.js - can do server with API routes. Can do serverless if you host on Vercel.

    49:44 - SEO

    • Tags
      • Gatsby - Helmet
      • Next - Head
    • Sitemap
      • Plugin for both

    49:55 - Plugin Ecosystem

    • Gatsby has lots of plugins that you install
    • Next.js has some too. Seems Gatsby is easier in this regard because plugins can manage and normalize data into the GRaphQL Layer.

    53:10 - Auth

    55:00 - E-commerce

    • Gatsby - options are mostly limited to Snipcart and Shopify like iframe drop in solutions where the majority of operations take place on another site and service.
    • Next.js - hey released a starter boilerplate that leans on an existing headless cart
    • https://rainierwatch.com/

    Links

    ××× SIIIIICK ××× PIIIICKS ×××

    Shameless Plugs

    Tweet us your tasty treats!