How to test if a component is rendered with the right props when using react-testing-library?

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Less time debugging, more time building
  • react-testing-library

    🐐 Simple and complete React DOM testing utilities that encourage good testing practices.

    expect(wrapper.find('FetchNextPageButton').props()).toMatchObject({ query: NEWS\_QUERY, path: ""}) So I'm wondering what's the best approach to test it by using React testing library instead.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts