Book description
React helps you create and work on an app in just a few minutes. But learning how to put all the pieces together is hard. How do you validate a form? Or implement a complex multistep user action without writing messy code? How do you test your code? Make it reusable? Wire it to a backend? Keep it easy to understand? The React Cookbook delivers answers fast.
Many books teach you how to get started, understand the framework, or use a component library with React, but very few provide examples to help you solve particular problems. This easy-to-use cookbook includes the example code developers need to unravel the most common problems when using React, categorized by topic area and problem.
You'll learn how to:
- Build a single-page application in React using a rich UI
- Create progressive web applications that users can install and work with offline
- Integrate with backend services such as REST and GraphQL
- Automatically test for accessibility problems in your application
- Secure applications with fingerprints and security tokens using WebAuthn
- Deal with bugs and avoid common functional and performance problems
Table of contents
- Preface
-
1. Creating Applications
- 1.1. Generate a Simple Application
- 1.2. Build Content-Rich Apps with Gatsby
- 1.3. Build Universal Apps with Razzle
- 1.4. Manage Server and Client Code with Next.js
- 1.5. Create a Tiny App with Preact
- 1.6. Build Libraries with nwb
- 1.7. Add React to Rails with Webpacker
- 1.8. Create Custom Elements with Preact
- 1.9. Use Storybook for Component Development
- 1.10. Test Your Code in a Browser with Cypress
- 2. Routing
- 3. Managing State
- 4. Interaction Design
- 5. Connecting to Services
- 6. Component Libraries
- 7. Security
-
8. Testing
- 8.1. Use the React Testing Library
- 8.2. Use Storybook for Render Tests
- 8.3. Test Without a Server Using Cypress
- 8.4. Use Cypress for Offline Testing
- 8.5. Test in a Browser with Selenium
- 8.6. Test Cross-Browser Visuals with ImageMagick
- 8.7. Add a Console to Mobile Browsers
- 8.8. Remove Randomness from Tests
- 8.9. Time Travel
- 9. Accessibility
- 10. Performance
- 11. Progressive Web Applications
- Index
- About the Authors
Product information
- Title: React Cookbook
- Author(s):
- Release date: August 2021
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781492085843
You might also like
book
Skills of a Successful Software Engineer
Skills to grow from a solo coder into a productive member of a software development team, …
book
Designing Data-Intensive Applications
Data is at the center of many challenges in system design today. Difficult issues need to …
book
The Staff Engineer's Path
For years, companies have rewarded their most effective engineers with management positions. But treating management as …
book
Modern Full-Stack Development: Using TypeScript, React, Node.js, Webpack, and Docker
Explore what React, Node, TypeScript, Webpack, and Docker have to offer individually, and how they all …