
Learn how React Router’s Middleware API fixes leaky redirects and redundant data fetching in protected routes.

Learn how TanStack DB transactions ensure data consistency on the frontend with atomic updates, rollbacks, and optimistic UI in a simple order manager app.

useEffect mistakesDiscover what’s new in The Replay, LogRocket’s newsletter for dev and engineering leaders, in the November 5th issue.

useEffect mistakes to avoid in your React appsShruti Kapoor breaks down the confusion around useEffect and goes over 15 common mistakes she’s seen in the React apps she’s reviewed.
Hey there, want to help make our blog better?
Join LogRocket’s Content Advisory Board. You’ll help inform the type of content we create and get access to exclusive meetups, social accreditation, and swag.
Sign up now
One Reply to "TDD with React: A low-friction approach with examples"
Using `ByText` is not recommended. You don’t ensure that the selector found is part of the accessibility tree. `ByRole` is the much preferred selector. See: https://kentcdodds.com/blog/common-mistakes-with-react-testing-library#using-the-wrong-query