React can do both!
GET - /
SERVER
<!DOCTYPE html>
<html>
<head>
<title>Pup vs Pup</title>
<link rel="stylesheet" href="/css/style.css">
<script src="public/bundle.js" defer></script>
</head>
<body>
<div id="app"></div>
</body>
</html>
index.html
CLIENT SIDE
SERVER SIDE
DISCUSSION
DEMO
User View
CLIENT SIDE
SERVER SIDE
DISCUSSION
DEMO
GET - /public/bundle.js
SERVER
bundle.js
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
....
21,547 MORE LINES OF CODE
CLIENT SIDE
SERVER SIDE
DISCUSSION
DEMO
CLIENT SIDE
SERVER SIDE
DISCUSSION
DEMO
But where are the pups???
PuppyDB
GET - /api/puppies
CLIENT SIDE
SERVER SIDE
DISCUSSION
DEMO
CLIENT SIDE
SERVER SIDE
DISCUSSION
DEMO
GET - /
1
SERVER
GET - /bundle.js
2
React.DOM Render
3
React.DOM Render
5
GET - api/puppies
4
"First Meaningful Paint"
GET - /style.css
CLIENT SIDE
SERVER SIDE
DISCUSSION
DEMO
class="no-js edition-domestic app-homepage"
CLIENT SIDE
SERVER SIDE
DISCUSSION
DEMO
GET - /
1
SERVER
React.DOM Render
2
CLIENT SIDE
SERVER SIDE
DISCUSSION
DEMO
CLIENT SIDE
SERVER SIDE
DISCUSSION
DEMO