Leanpub Header

Skip to main content

ReactJS Documentation

Offline Ebook PDF Version of the ReactJS v16.13.1 Documentation

Easy to read ebook format of the official ReactJS documentation. This is version 16.13.1 as hosted on reactjs.org, the idea is to help the community with a portable and easy to read version for offline reference.

The author is letting you choose the price you pay for this book!

Pick Your Price...
PDF
EPUB
WEB
139
Readers
733
Pages
About

About

About the Book

ReactJS is a Javascript library for building user interfaces. This PDF ebook is a portable offline reference guide for the community, can be printed or synced with your kindle for a better reading experience. It's based on ReactJS version v.16.13.1

This is an excellent reference format for ReactJS beginners, is not a tutorial just the official documentation for your reference.

React JS Documentation pdf download

This book is not officially endorsed by ReactJS

Check out other books from the author:

Performance Optimized React Applications

React Hooks

Javascript Snippets

Appwrite Up and Running

Front End Developer Interview Questions

Up to Speed with Javascript in 59 minutes

Backend Developer Interview Questions

VueJS Documentation

React Redux Documentation

DevOPs

Data Science Workflow for Beginners

---

Some of the most common questions in relation to React Js

What is React js used for?

React. js is an open-source JavaScript library that is used for building user interfaces specifically for single-page applications. It's used for handling the view layer for web and mobile apps. React also allows us to create reusable UI components.

Is React js frontend or backend?

js/React is an open-source frontend framework that is based on JavaScript, developed by Facebook, and best known for its virtual DOM feature. With React, we recommend Express. js/Express as a backend service.

Is React js a programming language?

React is a popular and widely used programming language at present since almost every web developer or a full-stack developer is using it.

What is difference between JavaScript and Reactjs?

Plain JS apps usually start with the initial UI created on the server (as HTML), whereas React apps start with a blank HTML page, and dynamically create the initial state in JavaScript. React requires you to break your UI into components, but plain JS apps can be structured in any way you see fit.

Why React is so popular?

Being simple to read and easy to use made React easy to understand and implement, allowing businesses to hit the ground running and build what they need as quickly as possible. Beyond that, React's ease of use has also helped many developers adopt the technology and make it part of their toolkit.

Can I learn React without knowing JavaScript?

Since React is a JS library, there is no way around learning JavaScript. You cannot learn React without JavaScript or without knowing JavaScript in the first place. In comparison to other frontend solutions, React makes heavily use of JavaScript.

Share this book

License

Creative Commons Attribution 4.0 International License

Price

Pick Your Price...

Minimum price

$7.99

$7.99

You pay

$7.99

Author earns

$5.75

Cause gets

$0.64
$

All prices are in US $. You can pay in US $ or in your local currency when you check out.

EU customers: prices exclude VAT, which is added during checkout.

...Or Buy With Credits!

Number of credits (Minimum 1)

1
The author will earn $12.00 from your purchase!
You can get credits monthly with a Reader Membership

Author

About the Author

A.J. García

I started my coding career back in 2003. Lately I've been involved a lot in Javascript for frontend and the backend.

I would love passing along to you some of the experiences and challenges I've faced over the years.

Contents

Table of Contents

This Book

  1. Recommended Resources
  2. Recommended Books

Getting Started

  1. Try React
  2. Learn React
  3. Staying Informed
  4. Versioned Documentation
  5. Something Missing?

Add React to a Website

  1. Add React in One Minute
  2. Optional: Try React with JSX

Create a New React App

  1. You Might Not Need a Toolchain
  2. Recommended Toolchains
  3. Creating a Toolchain from Scratch

CDN Links

Release Channels

Hello World

  1. How to Read This Guide
  2. Knowledge Level Assumptions
  3. Let’s Get Started!

Introducing JSX

Rendering Elements

  1. Rendering an Element into the DOM
  2. Updating the Rendered Element
  3. React Only Updates What’s Necessary

Components and Props

  1. Function and Class Components
  2. Rendering a Component
  3. Composing Components
  4. Extracting Components
  5. Props are Read-Only

State and Lifecycle

  1. Converting a Function to a Class
  2. Adding Local State to a Class
  3. Adding Lifecycle Methods to a Class
  4. Using State Correctly
  5. The Data Flows Down

Handling Events

  1. Passing Arguments to Event Handlers

Conditional Rendering

Lists and Keys

  1. Keys

Forms

  1. Controlled Components
  2. The textarea Tag
  3. The select Tag
  4. The file input Tag
  5. Handling Multiple Inputs
  6. Controlled Input Null Value
  7. Alternatives to Controlled Components
  8. Fully-Fledged Solutions

Lifting State Up

  1. Adding a Second Input
  2. Writing Conversion Functions
  3. Lifting State Up
  4. Lessons Learned

Composition vs Inheritance

  1. Containment
  2. Specialization
  3. So What About Inheritance?

Thinking in React

  1. Start With A Mock
  2. Step 1: Break The UI Into A Component Hierarchy
  3. Step 2: Build A Static Version in React
  4. Step 3: Identify The Minimal (but complete) Representation Of UI State
  5. Step 4: Identify Where Your State Should Live
  6. Step 5: Add Inverse Data Flow
  7. And That’s It

Accessibility

  1. Why Accessibility?
  2. Standards and Guidelines
  3. Semantic HTML
  4. Accessible Forms
  5. Focus Control
  6. Mouse and pointer events
  7. More Complex Widgets
  8. Other Points for Consideration
  9. Development and Testing Tools

Code Splitting

  1. Bundling
  2. Code Splitting
  3. import()
  4. React.lazy
  5. Route-based code splitting
  6. Named Exports

Context

  1. When to Use Context
  2. Before You Use Context
  3. API
  4. Examples
  5. Caveats
  6. Legacy API

Error Boundaries

  1. Introducing Error Boundaries
  2. Live Demo
  3. Where to Place Error Boundaries
  4. New Behavior for Uncaught Errors
  5. Component Stack Traces
  6. How About try/catch?
  7. How About Event Handlers?
  8. Naming Changes from React 15

Forwarding Refs

  1. Forwarding refs to DOM components
  2. Note for component library maintainers
  3. Forwarding refs in higher-order components
  4. Displaying a custom name in DevTools

Fragments

  1. Motivation
  2. Usage

Higher Order Components

  1. Use HOCs For Cross-Cutting Concerns
  2. Don’t Mutate the Original Component. Use Composition.
  3. Convention: Pass Unrelated Props Through to the Wrapped Component
  4. Convention: Maximizing Composability
  5. Convention: Wrap the Display Name for Easy Debugging
  6. Caveats

Integrating with Other Libraries

  1. Integrating with DOM Manipulation Plugins
  2. Integrating with Other View Libraries
  3. Integrating with Model Layers

JSX In Depth

  1. Specifying The React Element Type
  2. Props in JSX
  3. Children in JSX

Optimizing Performance

  1. Use the Production Build
  2. Profiling Components with the Chrome Performance Tab
  3. Profiling Components with the DevTools Profiler
  4. Virtualize Long Lists
  5. Avoid Reconciliation
  6. shouldComponentUpdate In Action
  7. Examples
  8. The Power Of Not Mutating Data

Portals

  1. Usage
  2. Event Bubbling Through Portals

Profiler API

  1. Usage
  2. onRender Callback

React Without ES6

  1. Declaring Default Props
  2. Setting the Initial State
  3. Autobinding
  4. Mixins

React Without JSX

Reconciliation

  1. Motivation
  2. The Diffing Algorithm
  3. Tradeoffs

Refs and the DOM

Render Props

  1. Use Render Props for Cross-Cutting Concerns
  2. Using Props Other Than render
  3. Caveats

Static Type Checking

  1. Flow
  2. TypeScript
  3. Reason
  4. Kotlin
  5. Other Languages

Strict Mode

Typechecking With PropTypes

Uncontrolled Components

  1. The file input Tag

Web Components

  1. Using Web Components in React
  2. Using React in your Web Components

React Top-Level API

  1. Overview
  2. Reference

React Component

  1. Overview
  2. Reference
  3. Other APIs
  4. Class Properties
  5. Instance Properties

ReactDOM

  1. Overview
  2. Reference

ReactDOMServer

  1. Overview
  2. Reference

DOM Elements

  1. Differences In Attributes
  2. All Supported HTML Attributes

SyntheticEvent

  1. Overview
  2. Supported Events
  3. Reference

Test Utilities

  1. Overview
  2. Reference
  3. Other Utilities

Test Renderer

  1. Overview
  2. Reference
  3. Ideas

JavaScript Environment Requirements

Glossary of React Terms

  1. Single-page Application
  2. ES6, ES2015, ES2016, etc
  3. Compilers
  4. Bundlers
  5. Package Managers
  6. CDN
  7. JSX
  8. Elements
  9. Components
  10. Lifecycle Methods
  11. Keys
  12. Refs
  13. Events
  14. Reconciliation

Introducing Hooks

  1. Video Introduction
  2. No Breaking Changes
  3. Motivation
  4. Gradual Adoption Strategy
  5. Frequently Asked Questions
  6. Next Steps

Hooks at a Glance

  1. State Hook
  2. Effect Hook
  3. Rules of Hooks
  4. Building Your Own Hooks
  5. Other Hooks
  6. Next Steps

Using the State Hook

  1. Equivalent Class Example
  2. Hooks and Function Components
  3. What’s a Hook?
  4. Declaring a State Variable
  5. Reading State
  6. Updating State
  7. Recap
  8. Next Steps

Using the Effect Hook

  1. Effects Without Cleanup
  2. Effects with Cleanup
  3. Recap
  4. Tips for Using Effects
  5. Next Steps

Rules of Hooks

  1. ESLint Plugin
  2. Explanation
  3. Next Steps

Building Your Own Hooks

  1. Extracting a Custom Hook
  2. Using a Custom Hook
  3. useYourImagination()

Hooks API Reference

  1. Basic Hooks
  2. Additional Hooks

Hooks FAQ

  1. Adoption Strategy
  2. From Classes to Hooks
  3. Performance Optimizations
  4. Under the Hood

Testing Overview

Testing Recipes

Testing Environments

Introducing Concurrent Mode (Experimental)

  1. What Is Concurrent Mode?
  2. Blocking vs Interruptible Rendering
  3. Putting Research into Production
  4. Next Steps

Suspense for Data Fetching (Experimental)

  1. What Is Suspense, Exactly?
  2. Using Suspense in Practice
  3. Traditional Approaches vs Suspense
  4. Start Fetching Early
  5. Suspense and Race Conditions
  6. Handling Errors
  7. Next Steps

Concurrent UI Patterns (Experimental)

  1. Transitions
  2. The Three Steps
  3. Other Patterns
  4. Next Steps

Adopting Concurrent Mode (Experimental)

  1. Installation
  2. What to Expect

Concurrent Mode API Reference (Experimental)

  1. Enabling Concurrent Mode
  2. Suspense API

AJAX and APIs

Babel, JSX, and Build Steps

Passing Functions to Components

Component State

Styling and CSS

File Structure

Versioning Policy

Virtual DOM and Internals

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

Causes

Causes Supported

Free Software Foundation

Free Software Foundation FSF

http://www.fsf.org
The Free Software Foundation (FSF) is a nonprofit with a worldwide mission to promote computer user freedom. We defend the rights of all software users.
As our society grows more dependent on computers, the software we run is of critical importance to securing the future of a free society. Free software is about having control over the technology we use in our homes, schools and businesses, where computers work for our individual and communal benefit, not for proprietary software companies or governments who might seek to restrict and monitor us.

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...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

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

In fact, authors have earned over $14 million writing, 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