SlideShare a Scribd company logo
React Server Side Rendering with Next.js
!
PATENTS
What's Next.js for React?
Jamie Barton
React Server Side Rendering with Next.js
@notrab
@norseal
Ruby on Rails
JavaScript
React dot js
React Server Side Rendering with Next.js
React Server Side Rendering with Next.js
React Server Side Rendering with Next.js
Redux
GraphQL
React Server Side Rendering with Next.js
zeit/next.js
create-react-app?
Core features of NextJS
Hot code reloading
Automatic code splitting
File system based routing
Convention over configuration
Server Side Rendering
Easy to deploy
Hot code reloading
Automatic code splitting
File system based routing
Convention over configuration
Server Side Rendering
Easy to deploy
SSR + SEO = ❤
💔
😱
SSR TTFB is slower than CSR
📈
File system based routing
yarn init -y
yarn add next@latest
yarn add next@latest react react-dom
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
}
./pages
./pages/index.js
export default () => <h1>Hello world!</h1>
yarn dev
React Server Side Rendering with Next.js
./pages/about.js
export default () => <h1>About us</h1>
React Server Side Rendering with Next.js
React Server Side Rendering with Next.js
Routing
import Link from 'next/link'
Example: Layout
./components/layout.js
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>
<Link href="/about">About</Link>
export default () => <h1>Hello world!</h1>
import Layout from '../components/layout'
export default () =>
<Layout>
<h1>Hello world!</h1>
</Layout>
export default () => <h1>About us</h1>
import Layout from '../components/layout'
export default () =>
<Layout>
<h1>About us</h1>
</Layout>
React Server Side Rendering with Next.js
Script Preloading
<Link href="/about">About</Link>
<Link href="/about" prefetch>About</Link>
Data Fetching
React Server Side Rendering with Next.js
async getInitialProps()
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 }
}
Easy to deploy
npm install -g now
now
next build && next export
Custom Babel config
Custom Webpack config
Custom server logic
CSS-in-JS
But what about…?
React Server Side Rendering with Next.js
github.com/zeit/next.js
🤔

More Related Content

PPTX
Nextjs13.pptx
PDF
NextJS, A JavaScript Framework for building next generation SPA
PPTX
Next.js - ReactPlayIO.pptx
PDF
PDF
Getting started with Next.js
PPTX
Next.js vs React | what to choose for frontend development_
PPTX
Server side rendering review
PPTX
React workshop presentation
Nextjs13.pptx
NextJS, A JavaScript Framework for building next generation SPA
Next.js - ReactPlayIO.pptx
Getting started with Next.js
Next.js vs React | what to choose for frontend development_
Server side rendering review
React workshop presentation

What's hot (20)

PPTX
Reactjs
PDF
What's new in NextJS 13_.pdf
PPTX
Introduction to NodeJS
PPTX
Node.js Express
PPTX
REST-API introduction for developers
PDF
NodeJS for Beginner
PPTX
Build RESTful API Using Express JS
PPTX
Spring boot Introduction
PPTX
Spring Boot Tutorial
PPT
Spring Core
PDF
Node.js - #1 - Introdução - Rodrigo Branas
PDF
Spring Data JPA
PDF
Universal React apps in Next.js
PDF
Rest web services
PPTX
Introduction to MERN
PDF
PDF
React js
PDF
React JS - Introduction
PDF
Service Worker Presentation
PDF
[215] Druid로 쉽고 빠르게 데이터 분석하기
Reactjs
What's new in NextJS 13_.pdf
Introduction to NodeJS
Node.js Express
REST-API introduction for developers
NodeJS for Beginner
Build RESTful API Using Express JS
Spring boot Introduction
Spring Boot Tutorial
Spring Core
Node.js - #1 - Introdução - Rodrigo Branas
Spring Data JPA
Universal React apps in Next.js
Rest web services
Introduction to MERN
React js
React JS - Introduction
Service Worker Presentation
[215] Druid로 쉽고 빠르게 데이터 분석하기
Ad

Similar to React Server Side Rendering with Next.js (20)

KEY
Modular Web Applications With Netzke
PDF
Deploying configurable frontend web application containers
PPTX
JavaScript Perfomance
PPTX
JavaScript Performance (at SFJS)
PDF
Play Framework: async I/O with Java and Scala
PDF
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
PDF
Full Stack Scala
PPTX
Presentation Tier optimizations
PDF
Next.js Introduction
PDF
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
PDF
Front End Development for Back End Java Developers - Jfokus 2020
PDF
Beyond Breakpoints: Improving Performance for Responsive Sites
PDF
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
PDF
Integrating React.js Into a PHP Application
PDF
Profiling PHP with Xdebug / Webgrind
PPT
Java 6 [Mustang] - Features and Enchantments
PPTX
SSR with Quasar Framework - JSNation 2019
PDF
Spring Boot
PPTX
Javascript Bundling and modularization
PDF
Modular Web Applications With Netzke
Deploying configurable frontend web application containers
JavaScript Perfomance
JavaScript Performance (at SFJS)
Play Framework: async I/O with Java and Scala
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
Full Stack Scala
Presentation Tier optimizations
Next.js Introduction
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
Front End Development for Back End Java Developers - Jfokus 2020
Beyond Breakpoints: Improving Performance for Responsive Sites
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
Integrating React.js Into a PHP Application
Profiling PHP with Xdebug / Webgrind
Java 6 [Mustang] - Features and Enchantments
SSR with Quasar Framework - JSNation 2019
Spring Boot
Javascript Bundling and modularization
Ad

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PPT
Teaching material agriculture food technology
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Cloud computing and distributed systems.
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Sensors and Actuators in IoT Systems using pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Transforming Manufacturing operations through Intelligent Integrations
KodekX | Application Modernization Development
Teaching material agriculture food technology
Advanced Soft Computing BINUS July 2025.pdf
NewMind AI Monthly Chronicles - July 2025
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
“AI and Expert System Decision Support & Business Intelligence Systems”
GamePlan Trading System Review: Professional Trader's Honest Take
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Understanding_Digital_Forensics_Presentation.pptx
Spectral efficient network and resource selection model in 5G networks
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Cloud computing and distributed systems.
Network Security Unit 5.pdf for BCA BBA.
Sensors and Actuators in IoT Systems using pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Spectroscopy.pptx food analysis technology
Transforming Manufacturing operations through Intelligent Integrations

React Server Side Rendering with Next.js