From the course: React: Testing and Debugging
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Solution: Practice ESLint best practices in a component - React.js Tutorial
From the course: React: Testing and Debugging
Solution: Practice ESLint best practices in a component
(upbeat music) - [Instructor] So for this coding challenge, I wanted to try something different. How do you test for ESLint best practices, even though we don't have access to ESLint in our coding environments? So what I've done here is, and we can actually hide this afterwards, I've added a bunch of tests that should actually check for several things in your code that will basically allow us to fix ESLint best practices, so the code is junky right now. It's not following the tests here, which are ESLint best practices, and what I'm going to do, once I fix this, not only this is will render, 'cause right now, it's not even rendering properly, but this will also pass all the tests, so let's go ahead and start our fixing, and what I would do is read all of this and just to make sure, so first of all, let's go ahead. The first thing we need to check is, well, the app component is exported correctly. Then we check for the grid component is exported correctly, the item array is exported…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.