Book Image

ReactJS Blueprints

By : Sven A. Robbestad
Book Image

ReactJS Blueprints

By: Sven A. Robbestad

Overview of this book

<p>The JavaScript revolution has landed! ReactJS is one of those rare technologies that comes out of nowhere and turns established practices on their head. It provides a different way of thinking about how you should develop your apps, and has already gained a massive adoption among web developers. Join the revolution, build web apps faster, and have more fun developing!</p> <p>Packed with real-world code, this book starts by covering the idea behind ReactJS and the key concepts you must familiarize yourself with. You will learn how to bootstrap your ReactJS projects and you’ll also be provided with a handy scaffolding that you can use and reuse over and over.</p> <p>We then go on to cover a wide variety of apps, and will help you to structure and build your own components. Next, you will build a web shop, create a fully responsive and routable app, and also develop a real-time search app. Further on, you will be taught to work with public APIs to create a map-based application. You will also be taken through some advanced concepts such as <span id="description" class="sugar_field">Redux that are making a huge splash currently in the world of ReactJS. You’ll learn how to efficiently seal off your app for guest access, interact with hardware APIs, and create a photo app. You will then master the art of making your apps universal, and find out how to deploy them to the cloud. Finally, we wrap up the book as you are shown how to make a game. What better way to kick off your ReactJS development journey?</span></p>
Table of Contents (18 chapters)
ReactJS Blueprints
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Developing a server-rendered app


Developing a Shared app in ReactJS requires more work than just building a client-rendered app. It also necessitates that you think about your data flow requirements.

There are two components that together make it possible to write a server-rendered app in ReactJS. It can be thought of like an equation:

Pre-rendering components in your server instance + One-way data flow from the server to your components = good app and happy users

In this section, we'll look at the first part of the equation. We'll tackle the data flow issue in the final section of this chapter.

Adding packages

We're going to need a few more packages from npm to add them to our dependencies section. This is the list of dependencies that we need:

"devDependencies": {
  "react-transform-catch-errors": "^1.0.1",
  "react-transform-hmr": "^1.0.1",
  "redbox-react": "^1.2.0",
  "webpack-dev-middleware": "^1.4.0",
  "webpack-hot-middleware": "^2.6.0",
  "babel-cli": "^6.4.5",
  "babel-core": "^6.3...