Install the NPM Dependencies Needed for a Universal React App

Share this video with your friends

Send Tweet

We’ll npm install the packages needed to get universal components working. I'll introduce the family of packages that make this possible:

  • react-universal-component
  • webpack-flush-chunks
  • babel-plugin-universal-import
  • extract-css-chunks-webpack-plugin
  • webpack-hot-server-middleware (only necessary for dev)
Ron
Ron
~ 7 years ago

How do you compare this approach with next.js?

Tim Kindberg
Tim Kindberg(instructor)
~ 7 years ago

How do you compare this approach with next.js?

Next.js is a framework whereas this is a collection of tools. With Next.js you will definitely get up and running more quickly, but you must conform to their way of doing things. With react-universal-component you get the SSR plus code-splitting without buying in to Next.js.

Also Next.js comes with other solutions that you would need to figure out for yourself using this, for example, routing, head injection, css.

Pavel
Pavel
~ 6 years ago

great course, but slightly outdated due to Webpack 4 release. Any plans on update?