Reintroducing React
With Membership
Suggested price

Reintroducing React

Modern React with Every React Update Since v16 Demystified (includes advanced hooks)

About the Book

I wrote my first React application 3 to 4 years ago. Between then and now, the fundamental principles of React have remained the same. React is just as declarative and component-based today as it was then. 

That’s great news, however, the way we write React applications today has changed! 

There’s been a lot of new additions (and well, removals).

If you learned React a while back it’s not impossible that you haven’t been up to date with every new feature/release. It’s also possible to get lost on all the new features. Where exactly do you start? How important are they for your day to day use? 

Modern React has new interesting features that are worth your attention. It’s best to know those now, and not have to unlearn and relearn newer concepts. 

Whether you’ve been writing React for a while, or new to developing React applications, I will be discussing **every** update to React since version 16.

This will keep you in sync with the recent changes to React, and help you write better software. 

Remember, a reintroduction to React is important for not just beginners, but professionals alike. It all depends on how well you’ve kept your ear to the ground, and really studied the many changes that have been released over the last 12 months. 

On the bright side, I’m bringing you a one-stop reference to all the changes. From the new lifecycle methods to advanced hooks and reusable component patterns with hooks.

In this book, I’ll take you on a journey — alongside some humour and unique content to follow. 

The question is, are you ready to go on this journey with me? 

Got questions? Drop me a line at:


Or follow me on twitter:

About the Author

Ohans Emmanuel
Ohans Emmanuel

Ohans Emmanuel has been building complex Javascript front ends for companies all over the world. With the ability to demystify complex subjects, Ohans has been helping engineers build their careers in software development for years. Having authored over 5 books, he's always stoked to share the knowledge he has gained with other software engineers.

Table of Contents



Why Comic Strips ? 

Why Reintroduce React ? 

What’s Changed since version 16? 

Chapter 1: New Lifecycle Methods.

What’s Lifecycle Anyway.

Lifecycle Methods.

static getDerivedStateFromProps. 


The Error Handling Lifecycle Methods.

static getDerivedStateFromError.



Chapter 2: Simpler State Management with the Context API. 

Introduction to Context.

Example: The Mini-Bank Application.

Identifying Props being Drilled.

Avoid Props Drilling with Context.

Isolating Implementation Details.

Updating Context Values. 


Chapter 3: ContextType — Using Context without a Consumer. 

Using a Class Component with contextType.

The Perfect Solution? 


Chapter 4: React.memo === Functional PureComponent.

How React.memo works. 

Handling Deeply Nested Props. 


Chapter 5: The Profiler — Identifying Performance Bottlenecks.

Measuring Performance in React Apps. 

Getting Started. 

How does the Profiler Work?

Making Sense of the Profiler Results. 

The Flame Chart. 

The Ranked Chart. 

Component Chart. 


Example: Identifying Performance BottleNecks in the Bank Application.

Noting the Expected Behaviour.

Interpreting the Flame chart.

Profile Different Interactions. 

The Provider Value. 


Chapter 6: Lazy Loading with React.Lazy and Suspense.

What is Lazy Loading? 

Using React.lazy and Suspense. 

Handling Errors. 

No named exports.

Code splitting routes.

Example: Adding Lazy Loading to the Bank App. 


Chapter 7: Hooks — Building Simpler React Apps.

Introducing Hooks. 

The Candy Bowl.

The State Hook. 

Multiple useState calls.

Object as Initial Values 

The Effect Hook.

Passing Array Dependencies.

Build Your own Hooks

The Rules of Hooks

Advanced Hooks

Chapter 8: Advanced React Patterns with Hooks 


Why Advanced Patterns? 

Compound Components Pattern

Example: Building an Expanding Component. 

Designing the API 

Building the Expandable Component 

Building the Compound Child Components 

Manageable Styling for Reusable Components 

Building a Custom Hook 

Props Collection 

Prop Getters 

State Initializers 

State Reducer 

Control Props 


The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub