Which libraries are commonly used for testing React applications?
Jest and React Testing Library.
How would you mock a module during testing in Jest?
Using jest.mock().
What is the main principle of the React Testing Library?
The more your tests resemble the way your software is used, the more confidence they can give you.
What are some best practices when writing React components?
Keep components small and focused, favor functional components, lift state up when needed, and make components reusable.