Book Image

Universal JavaScript with React, Node, and Redux [Video]

By : Maxime Najim
Book Image

Universal JavaScript with React, Node, and Redux [Video]

By: Maxime Najim

Overview of this book

The latest trend in web development, Isomorphic JavaScript, allows developers to overcome some of the shortcomings of single page applications by running the same code on the server as well as on the client. Leading this trend is React, which when coupled with Node, allows developers to build JavaScript apps that are much faster and more SEO-friendly than single page applications. Universal JavaScript is the latest evolution in modern web development. It allows developers to overcome some of the shortcomings of single page applications by running the application code interchangeably on the server as well as on the client. This beginner friendly video course is a solid start for building real, production ready universal React apps. The video will Takes you from a beginner to working with node.js and React on the server and the client. It covers the fundamentals of the full set of technologies that you need to know in order to become an Universal JavaScript developer. Teaches you the skills required to become competent and comfortable sharing your JavaScript application on the client and sever environments.
Table of Contents (6 chapters)
Chapter 5
React and Redux on the Server
Content Locked
Section 4
Client : Hydrating and Rendering
In this video, we are going to look at initializing the Redux store with the pre-fetched server state and connecting our client React instance to the virtual DOM used on the server. - Place React rendered HTML placed in the “content” div and the initial state of the Redux store attached to the window.INITIAL_STATE global variable - Grab the initial state from the window.INITIAL_STATE__ global variable and pass it to our createStore() function as the initial state - Call ReactDOM.render() with the initialized store and the pre-rendered content div