Ravenous Part 1 - Compiled with warning

Hello all,

So I’ve finished part 1 of the Ravenous project, however when I type the npm start command, I get the attached error.

Can anyone help?

Thank you in advance!

It still compiled (with warnings) so it should work and render in the browser. It’s the way the project was designed so I would just accept the message and proceed with the rest of the steps. Two other options would be to do what the warning suggests: change from an anchor-tag to a button since it’s more semantic or add the comment above to to disable the eslint-warning. But warning is just shown to you when in the development stage. Should it be published (which I don’t recommend because the project stores the api key in the front-end code) then this warning would not show up to the users…

Thank you very much for your answer.

Just one thing, I’m not sure (if I want to) how I can change the anchor-tag to a button. :see_no_evil:

You can just use a html button-tag instead as shown here:
https://reactjs.org/docs/handling-events.html

But I would try to avoid modifying the project early in the steps as it comes with some risk of introducing new issues… It may be a better time to modify it when project is done and everything is working. Also, the css selectors would also need to be modified as an example of an issue it would introduce.

Great, thank you!
I won’t change anything as you suggested. Hopefully they’ll all come together at the end. :slight_smile: