Upgrade to Pro — share decks privately, control downloads, hide ads and more …

React Server Side Rendering with Next.js

Jamie Barton
September 26, 2017

React Server Side Rendering with Next.js

In this talk, Jamie will demonstrate some core principles of a minimalist React framework called Next.js - We’ll also learn why SEO isn’t the only benefit of Server Side Rendering in React.

Jamie Barton

September 26, 2017
Tweet

More Decks by Jamie Barton

Other Decks in Programming

Transcript

  1. !

  2. Hot code reloading Automatic code splitting File system based routing

    Convention over configuration Server Side Rendering Easy to deploy
  3. Hot code reloading Automatic code splitting File system based routing

    Convention over configuration Server Side Rendering Easy to deploy
  4. import Link from 'next/link' export default ({ children }) =>

    <div> <nav> <Link href="/">Home</Link> &middot; <Link href="/about">About</Link> </nav> <main> {children} </main> <footer> &copy; 2017 </footer> </div>
  5. Page.getInitialProps = async ({ req }) => { const res

    = await fetch('https://api.github.com/repos/zeit/next.js') const json = await res.json() return { stars: json.stargazers_count } }
  6. now