Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
React Cookbook

You're reading from   React Cookbook Create dynamic web apps with React using Redux, Webpack, Node.js, and GraphQL

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781783980727
Length 580 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Carlos Santana Roldán Carlos Santana Roldán
Author Profile Icon Carlos Santana Roldán
Carlos Santana Roldán
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Working with React FREE CHAPTER 2. Conquering Components and JSX 3. Handling Events, Binding and Useful React Packages 4. Adding Routes to Our Application with React Router 5. Mastering Redux 6. Creating Forms with Redux Form 7. Animations with React 8. Creating an API with Node.js Using MongoDB and MySQL 9. Apollo and GraphQL 10. Mastering Webpack 4.x 11. Implementing Server-Side Rendering 12. Testing and Debugging 13. Deploying to Production 14. Working with React Native 15. Most Common React Interview Questions
16. Other Books You May Enjoy

Introduction

React typically uses client-side rendering (CSR). This means that it dynamically injects the HTML code in the target div (it generally uses the #app or #root IDs), and that's why if you try to see the page's code directly (right-click—View Page Code) you will see something like this:

The only way to see the actual code is by inspecting the site with Chrome Dev Tools, or other tools, and here is the code generated by React using CSR:

By inspecting the page, you can see the code that is injected into our #root div. Server-side rendering (SSR) is very useful for improving the SEO of our website and be indexed by the main search engines, such as Google, Yahoo, and Bing. You probably don't need to worry about SSR if you don't care too much about SEO. Currently, the Googlebot supports CSR, and it can index our site on...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image