SlideShare a Scribd company logo
1 of 12
Isomorphic Web Apps
with React
Don’t we have solutions for SEO with
single page apps already?
Is server rendering necessary?
https://developers.google.com/webmasters/
ajax-crawling/docs/specification
The Google AJAX
Crawling Spec
“Server Rendering”
App
Server
Prerender
Intarwebs
Amazon S3
“Yak shaving is what you are doing when
you're doing some stupid, fiddly little task
that bears no obvious relationship to what
you're supposed to be working on, but yet a
chain of twelve causal relations links what
you're doing to the original meta-task.”
- Jeremy H. Brown. http://projects.csail.mit.edu/gsb/old-archive/gsb-archive/gsb2000-02-
11.html
Server Rendering with React
App
Server
Intarwebs
● Design your URLs first, they are important.
● Choose libraries that work in node and the
browser
● Use CommonJS and a module bundler
Core Architecture
Fetching data is typically an
asynchronous process.
React.renderToString is a
synchronous process.
React.render vs React.renderToString
getInitialState
componentWillMount
shouldComponentUpdate
componentWillUpdate
render
componentDidUpdate
componentDidMount
componentWillUnmount
getInitialState
componentWillMount
render
Initial Render
Server
React.renderToString(App(data))
Browser
React.render(App(data))
HTML, JSON.stringify(data)
Demo
https://github.com/larrymyers/react-isomorphic-demo

More Related Content

What's hot

Getting started with Ruby on Rails
Getting started with Ruby on RailsGetting started with Ruby on Rails
Getting started with Ruby on Rails
Rob Davarnia
 

What's hot (20)

React vs-angular-mobile
React vs-angular-mobileReact vs-angular-mobile
React vs-angular-mobile
 
Introduction to Cross Platform Mobile Apps (Xamarin)
Introduction to Cross Platform Mobile Apps (Xamarin)Introduction to Cross Platform Mobile Apps (Xamarin)
Introduction to Cross Platform Mobile Apps (Xamarin)
 
How we built a job board in one week with JHipster
How we built a job board in one week with JHipsterHow we built a job board in one week with JHipster
How we built a job board in one week with JHipster
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
 
Azure Functions Overview
Azure Functions OverviewAzure Functions Overview
Azure Functions Overview
 
Azue Webjobs
Azue WebjobsAzue Webjobs
Azue Webjobs
 
Getting started with Ruby on Rails
Getting started with Ruby on RailsGetting started with Ruby on Rails
Getting started with Ruby on Rails
 
Talent42 2017: Maisha Cannon 1-Pager Brewing Boolean
Talent42 2017: Maisha Cannon 1-Pager Brewing BooleanTalent42 2017: Maisha Cannon 1-Pager Brewing Boolean
Talent42 2017: Maisha Cannon 1-Pager Brewing Boolean
 
WordPress: React Way
WordPress: React WayWordPress: React Way
WordPress: React Way
 
React vs Angular: ups & downs (speaker Oleksandr Kovalov, Binary Studio)
React vs Angular: ups & downs (speaker Oleksandr Kovalov, Binary Studio)React vs Angular: ups & downs (speaker Oleksandr Kovalov, Binary Studio)
React vs Angular: ups & downs (speaker Oleksandr Kovalov, Binary Studio)
 
AngularJS
AngularJSAngularJS
AngularJS
 
Azure Web Sites
Azure Web SitesAzure Web Sites
Azure Web Sites
 
Modern Functional Fluent ColdFusion REST Apis
Modern Functional Fluent ColdFusion REST ApisModern Functional Fluent ColdFusion REST Apis
Modern Functional Fluent ColdFusion REST Apis
 
20200610 - Power BI Tips, Tricks & Hacks @ RADACAD
20200610  - Power BI Tips, Tricks & Hacks @ RADACAD20200610  - Power BI Tips, Tricks & Hacks @ RADACAD
20200610 - Power BI Tips, Tricks & Hacks @ RADACAD
 
Making share point rock with angular and react
Making share point rock with angular and reactMaking share point rock with angular and react
Making share point rock with angular and react
 
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
 
Building 3D Models with Skycatch & Autodesk Recap API's
Building 3D Models with Skycatch & Autodesk Recap API'sBuilding 3D Models with Skycatch & Autodesk Recap API's
Building 3D Models with Skycatch & Autodesk Recap API's
 
VelocityConf EU 2013 - Turbocharge your mobile web apps by using offline
VelocityConf EU 2013 - Turbocharge your mobile web apps by using offline VelocityConf EU 2013 - Turbocharge your mobile web apps by using offline
VelocityConf EU 2013 - Turbocharge your mobile web apps by using offline
 
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
 
Angular universal
Angular universalAngular universal
Angular universal
 

Viewers also liked

Alan H Goldsmith Resume 2015
Alan H Goldsmith Resume 2015Alan H Goldsmith Resume 2015
Alan H Goldsmith Resume 2015
ALAN H GOLDSMITH
 

Viewers also liked (14)

GLOVER_NFFP_04_Tech_Rpt
GLOVER_NFFP_04_Tech_RptGLOVER_NFFP_04_Tech_Rpt
GLOVER_NFFP_04_Tech_Rpt
 
Alan H Goldsmith Resume 2015
Alan H Goldsmith Resume 2015Alan H Goldsmith Resume 2015
Alan H Goldsmith Resume 2015
 
True tech
True techTrue tech
True tech
 
Передовые производственные технологии в строительстве формируют новые стандар...
Передовые производственные технологии в строительстве формируют новые стандар...Передовые производственные технологии в строительстве формируют новые стандар...
Передовые производственные технологии в строительстве формируют новые стандар...
 
мята истинная (mint true)
мята истинная (mint true)мята истинная (mint true)
мята истинная (mint true)
 
ложная мята (false mint)
ложная мята (false mint)ложная мята (false mint)
ложная мята (false mint)
 
Математическое моделирование поведения морских гидротехнических объектов в ср...
Математическое моделирование поведения морских гидротехнических объектов в ср...Математическое моделирование поведения морских гидротехнических объектов в ср...
Математическое моделирование поведения морских гидротехнических объектов в ср...
 
Вкусное печенье с корицей за 15 минут
Вкусное печенье с корицей за 15 минутВкусное печенье с корицей за 15 минут
Вкусное печенье с корицей за 15 минут
 
Rug Cleaning
Rug Cleaning Rug Cleaning
Rug Cleaning
 
Història Super Smash Bros
Història Super Smash BrosHistòria Super Smash Bros
Història Super Smash Bros
 
The breathtaking decline
The breathtaking declineThe breathtaking decline
The breathtaking decline
 
Thalassemia
ThalassemiaThalassemia
Thalassemia
 
서울시 미세먼지 데이터 분석
서울시 미세먼지 데이터 분석서울시 미세먼지 데이터 분석
서울시 미세먼지 데이터 분석
 
ENCRYPT.DOC
ENCRYPT.DOCENCRYPT.DOC
ENCRYPT.DOC
 

Similar to Isomorphic web apps with react

Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 

Similar to Isomorphic web apps with react (20)

9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose
 
Lazy load Website Assets
Lazy load Website AssetsLazy load Website Assets
Lazy load Website Assets
 
How to Make React SEO-friendly
How to  Make React SEO-friendlyHow to  Make React SEO-friendly
How to Make React SEO-friendly
 
React.js alternatives modern web frameworks and lightweight java script libr...
React.js alternatives  modern web frameworks and lightweight java script libr...React.js alternatives  modern web frameworks and lightweight java script libr...
React.js alternatives modern web frameworks and lightweight java script libr...
 
Advantages of React over Angular
Advantages of React over AngularAdvantages of React over Angular
Advantages of React over Angular
 
Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
 
Comparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAsComparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAs
 
React vs. angular a comprehensive guideline for choosing right front-end fr...
React vs. angular   a comprehensive guideline for choosing right front-end fr...React vs. angular   a comprehensive guideline for choosing right front-end fr...
React vs. angular a comprehensive guideline for choosing right front-end fr...
 
React js, node js & angular js which one is the best for web development
React js, node js & angular js  which one is the best for web development React js, node js & angular js  which one is the best for web development
React js, node js & angular js which one is the best for web development
 
Angular 2 vs React
Angular 2 vs ReactAngular 2 vs React
Angular 2 vs React
 
Reactjs Basics
Reactjs BasicsReactjs Basics
Reactjs Basics
 
What is ReactJS?
What is ReactJS?What is ReactJS?
What is ReactJS?
 
Seo for single page applications
Seo for single page applicationsSeo for single page applications
Seo for single page applications
 
Selecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkSelecting the Best Javascript Web Framework
Selecting the Best Javascript Web Framework
 
Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NET
 
React seo tips to build seo friendly web applications
React seo tips to build seo friendly web applicationsReact seo tips to build seo friendly web applications
React seo tips to build seo friendly web applications
 
How to make React Applications SEO-friendly
How to make React Applications SEO-friendlyHow to make React Applications SEO-friendly
How to make React Applications SEO-friendly
 
React Js Simplified
React Js SimplifiedReact Js Simplified
React Js Simplified
 
React.js vs angular.js a comparison
React.js vs angular.js a comparisonReact.js vs angular.js a comparison
React.js vs angular.js a comparison
 
What is Server-side Rendering? How to Render Your React App on the Server-sid...
What is Server-side Rendering? How to Render Your React App on the Server-sid...What is Server-side Rendering? How to Render Your React App on the Server-sid...
What is Server-side Rendering? How to Render Your React App on the Server-sid...
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Isomorphic web apps with react

Editor's Notes

  1. “Isomorphic” - fancy way of saying that a javascript application can run on the client or server to render. React is currently the only js framework with server side rendering baked in as a core feature. (Ember.js fastboot is still in development, AirBnB has moved away from Rendr to React.) React server rendering allows us to create crawlable web apps while undoing years of hacks due to technology mismatches between the browser and the server. Allows us to take advantage of deferring as much as possible at page load since the content is already rendered.
  2. Googlebot translates the hash url to a querystring to request page state. Expected that the server will render the client app and send back the rendered markup. Businesses spun up around this: prerender.io, brombone This is a lot of extra infrastructure.
  3. No explicit documentation yet about how much javascript the googlebot executes, how long it will wait for async operations, etc. SEO with static html has much more existing knowledge and research already available, and is what all search engines do by default.
  4. Prerender can introduce significant latency into the rendering process. Caching prerendered pages solves the latency problem, but introduces potential for stale content. Managing caches and cache expiry introduces lots of complexity.
  5. Time spent setting up a prerender process is time not spent working on your actual application.
  6. Allows us to go back to how web apps have always worked, without having a technology split that requires duplicating code on the client and server.
  7. Both browserify and webpack have good solutions for bundling React and integrating with react-tools for jsx transformation. Choose which ever tool you’re most comfortable with. You don’t necessarily need to use a router with React, but it will help.
  8. You must gather all necessary data before rendering app. Easiest way to keep this simple is to have skinny route handlers, fat services.
  9. If using a Flux library just requires prepopulating your Stores with the proper data before calling React.renderToString.