Progressive Web Apps with React

Enhance the performance of your applications by using React and adding the Progressive web app capability to it
Preview in Mapt

Progressive Web Apps with React

Scott Domes

Enhance the performance of your applications by using React and adding the Progressive web app capability to it
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99 p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Progressive Web Apps with React Book Cover
Progressive Web Apps with React
$ 35.99
$ 25.20
Full Stack Development with JHipster Book Cover
Full Stack Development with JHipster
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $36.98
Add to Cart

Book Details

ISBN 139781788297554
Paperback302 pages

Book Description

For years, the speed and power of web apps has lagged behind native applications. Progressive Web Apps (PWAs) aim to solve this by bridging the gap between the web apps and native apps, delivering a host of exciting features. Simultaneously, React is fast becoming the go-to solution for building modern web UIs, combining ease of development with performance and capability. Using React alongside PWA technology will make it easy for you to build a fast, beautiful, and functional web app.

After an introduction and brief overview of the goals of PWAs, the book moves on to setting up the application structure. From there, it covers the Webpack build process and the process of creating React components. You'll learn how to set up the backend database and authentication solution to communicate with Firebase and how to work with React Router. Next, you will create and configure your web app manifest, making your PWA installable on mobile devices. Then you'll get introduced to service workers and see how they work as we configure the app to send push notifications using Firebase Cloud Messaging. We'll also explore the App Shell pattern, a key concept in PWAs and look at its advantages regarding efficient performance. Finally, you'll learn how to add of?ine capabilities to the app with caching and confirm your progress by auditing your PWA with Lighthouse. Also, you'll discover helper libraries and shortcuts that will help you save time and understand the future of PWA development.

Table of Contents

Chapter 1: Creating Our App Structure
Setting the scene
Beginning work
User stories
Application challenges
Let's get going
What is npm?
Node setup
The dark side of npm
Project initiation
Welcome to ReactDOM
Summary
Chapter 2: Getting Started with Webpack
Our project structure
Welcome to Webpack
Webpack loaders
Hot reloading
Summary
Chapter 3: Our App's Login Page
What is a React component?
Class components versus functional components
Our second component
State in React
Reusing components
Summary
Chapter 4: Easy Backend Setup With Firebase
What is Firebase?
Setting up
Authentication with Firebase
Saving our user
Summary
Chapter 5: Routing with React
The plan
Pages on pages
Our ChatContainer
Our first two Routes
Redirecting on login
Logging out
Our third Route
Summary
Chapter 6: Completing Our App
User stories progress
ChatContainer skeleton
Managing data flow
Creating a message
Loading data from Firebase
Displaying our messages
Message display improvements
The Profile page
Summary
Chapter 7: Adding a Service Worker
What is a service worker?
The service worker life cycle
Registering our first service worker
Experiencing the service worker life cycle
Adding Firebase to our service worker
Summary
Chapter 8: Using a Service Worker to Send Push Notifications
Requesting permission
Tracking tokens
Attaching a user to the token
Sending push notifications
Summary
Chapter 9: Making Our App Installable with a Manifest
What is an app manifest?
Making our app installable - Android
Making our app installable - iOS
App install banners and you
Summary
Chapter 10: The App Shell
What is progressive enhancement?
The RAIL model
Measuring using the timeline
PageSpeed Insights
The app shell pattern
Summary
Chapter 11: Chunking JavaScript to Optimize Performance with Webpack
The PRPL pattern
What is code splitting?
Higher-order components
Route splitting
Lazy loading
Summary
Chapter 12: Ready to Cache
What is caching?
The Cache API
Testing our cache
Summary
Chapter 13: Auditing Our App
What is Lighthouse?
The criteria
The Audits tab
Our first audit
Evaluating the readout
Using the Lighthouse CLI
Summary
Chapter 14: Conclusion and Next Steps
Next steps
Learning resources
Case studies
Example applications
Articles to read
Tools
Stretch goals
Closing words
Summary

What You Will Learn

  • Set up Webpack configuration, as well as get the development server running
  • Learn basic Firebase configuration and deployment
  • Create routes, manage multiple components, and learn how to use React Router v4 to manage the flow of data
  • Use React life cycle methods to load data
  • Add a service worker to the app and learn how it works
  • Use a service worker to send Push Notifications
  • Configure Webpack to split up the JavaScript bundle and lazy load component files
  • Learn how to use the web Cache API to use your app offline
  • Audit PWAs with Google's Lighthouse tool

Authors

Table of Contents

Chapter 1: Creating Our App Structure
Setting the scene
Beginning work
User stories
Application challenges
Let's get going
What is npm?
Node setup
The dark side of npm
Project initiation
Welcome to ReactDOM
Summary
Chapter 2: Getting Started with Webpack
Our project structure
Welcome to Webpack
Webpack loaders
Hot reloading
Summary
Chapter 3: Our App's Login Page
What is a React component?
Class components versus functional components
Our second component
State in React
Reusing components
Summary
Chapter 4: Easy Backend Setup With Firebase
What is Firebase?
Setting up
Authentication with Firebase
Saving our user
Summary
Chapter 5: Routing with React
The plan
Pages on pages
Our ChatContainer
Our first two Routes
Redirecting on login
Logging out
Our third Route
Summary
Chapter 6: Completing Our App
User stories progress
ChatContainer skeleton
Managing data flow
Creating a message
Loading data from Firebase
Displaying our messages
Message display improvements
The Profile page
Summary
Chapter 7: Adding a Service Worker
What is a service worker?
The service worker life cycle
Registering our first service worker
Experiencing the service worker life cycle
Adding Firebase to our service worker
Summary
Chapter 8: Using a Service Worker to Send Push Notifications
Requesting permission
Tracking tokens
Attaching a user to the token
Sending push notifications
Summary
Chapter 9: Making Our App Installable with a Manifest
What is an app manifest?
Making our app installable - Android
Making our app installable - iOS
App install banners and you
Summary
Chapter 10: The App Shell
What is progressive enhancement?
The RAIL model
Measuring using the timeline
PageSpeed Insights
The app shell pattern
Summary
Chapter 11: Chunking JavaScript to Optimize Performance with Webpack
The PRPL pattern
What is code splitting?
Higher-order components
Route splitting
Lazy loading
Summary
Chapter 12: Ready to Cache
What is caching?
The Cache API
Testing our cache
Summary
Chapter 13: Auditing Our App
What is Lighthouse?
The criteria
The Audits tab
Our first audit
Evaluating the readout
Using the Lighthouse CLI
Summary
Chapter 14: Conclusion and Next Steps
Next steps
Learning resources
Case studies
Example applications
Articles to read
Tools
Stretch goals
Closing words
Summary

Book Details

ISBN 139781788297554
Paperback302 pages
Read More

Read More Reviews

Recommended for You

Architecting Modern Java EE Applications Book Cover
Architecting Modern Java EE Applications
$ 39.99
$ 28.00
DevOps with Kubernetes Book Cover
DevOps with Kubernetes
$ 39.99
$ 28.00
Mastering Swift 4 - Fourth Edition Book Cover
Mastering Swift 4 - Fourth Edition
$ 35.99
$ 25.20
Understanding Software Book Cover
Understanding Software
$ 23.99
$ 16.80
Getting Started with Deep Learning with R [Integrated Course] Book Cover
Getting Started with Deep Learning with R [Integrated Course]
$ 124.99
$ 106.25
Full Stack Development with JHipster Book Cover
Full Stack Development with JHipster
$ 35.99
$ 25.20