About This Title

Pages: 180
Published: November 2024
ISBN: 9798888650653
In Beta

Skill Level Meter

Test-Driven React 2

Find Problems Early, Fix Them Quickly, Code with Confidence

by Trevor Burnham

You work in a loop: write code, get feedback, adjust. The faster you get feedback, the faster you can learn and become a more effective developer. Turn your React project requirements into tests and get the feedback you need faster than ever before. Stay focused on what’s important by running your tests continuously in the background. The second edition of Test-Driven React has been extensively revised to reflect the latest tools and techniques for React development, including TypeScript. Combine the power of testing, linting, and typechecking directly in your coding environment to iterate on React components quickly and fearlessly!

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $26.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Nov 2024

Beta Books: What do I get?


React revolutionized web development by abstracting away the details of DOM manipulation. That conceptual elegance has opened the door to a new generation of web testing: clear, expressive, and lightning fast. That makes React a perfect fit for test-driven development (TDD), a methodology in which tests are a blueprint instead of an afterthought.

Each chapter presents new projects to challenge you and new tools to help you. Write fast, easy-to-understand tests with Vitest and React Testing Library. Keep your code tidy with ESLint and Prettier. Perform every task you need from a single window within VS Code. See your test output directly in your code with Wallaby. Style components in a test-friendly way with styled-components. By understanding every piece of your project’s stack, you’ll feel more confident and able to focus on what matters: writing reliable and maintainable code.

The second edition of Test-Driven React has been updated to use TypeScript, the language of choice for modern React development. Find and fix type errors without even running your code. Generate beautiful documentation from type annotations with Storybook, and update it on every commit with GitHub Actions.

Discover a more joyful React development experience. Let your tests lead the way!

What You Need

You’ll need a working knowledge of JavaScript or TypeScript, and a computer running macOS, Windows, or Linux.

Resources

Releases:

  • B2.0 2024/04/18
  • B1.0 2024/03/19

Contents & Extracts

Note: Contents and extracts of beta books will change as the book is developed.

  • Introduction
    • What’s in This Book
    • What’s Not in This Book
    • What’s New in the Second Edition
    • How to Read the Code Examples
    • Online Resources
    • Mantra: Code with Joy
  • Test-Driven Development with Jest
  • Integrated Tooling with VS Code
    • Editing with VS Code
    • Checking Code Quality with ESLint
    • Beautifying Code with Prettier
    • Real-Time Testing with Wallaby
    • Mantra: Live in the Code
    • Example Palindrome Finder Solution
  • Testing React with Testing Library
    • Starting a React Project
    • Testing Simple Components with React Testing Library
    • Testing Nested Markup excerpt
    • Testing Stateful Components
    • Mantra: Test One Piece at a Time
  • Styling in JavaScript with Styled-Components
    • Adding an Example Page
    • Getting Started with Styled-Components
    • Testing Styled Components excerpt
    • Taking Snapshots of Styles
    • Mantra: Actively Seek Feedback
  • Refactoring with Hooks
    • Making Custom Hooks
    • The Controllable Pattern
    • Testing with Timers
    • Setting Timers with the useEffect Hook
    • Preventing Unnecessary Updates with useCallback and useRef
    • Inspecting Components with React Devtools
    • Mantra: Keep the Unit Small
  • Continuous Integration and Collaboration
    • Setting Up Travis CI
    • Git Hooks with Husky
    • Adding Docs with Storybook
    • Mantra: Actively Automate

Author

Trevor Burnham is a front-end engineer at Amazon Web Services (AWS). His previous books include CoffeeScript and Async JavaScript, both published by The Pragmatic Bookshelf.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $26.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Nov 2024

Beta Books: What do I get?

Related Titles:

Skill Level Meter

About This Title

Pages: 180
Published: November 2024
ISBN: 9798888650653
Edition: 1
In Beta