I am following this freeCodeCamp tutorial: https://youtu.be/4UZrsTqkcW4?t=10660
and am stuck at where the link takes you. I am getting the following error:
in your package.json. I wouldn’t think that you’ve have to add that. Is this a recent version of CRA?
I don’t know. This isn’t my strength, but I can’t see anything weird. Unless someone smarter than me can see something, I think we’d need a repo.
I think devDependencies might been added when I was playing around with adding the babel plugin to fix the error. I created a repo: https://github.com/jak6jak/create-react-app-bug hopefully this helps. I am on version 4.0.1 which is the latest version
That is wrong. If you are trying to spread out the properties of book, it should be:
return <Book key={book.id} {...book}></Book>
What you had was confusing it, it was like you were trying to pass in a parameter “book” that was a collection of properties - that confused babel. You can spread them like that, or you could use the spread operator to make a shallow copy, like: