Closed camilaibs closed 5 years ago
There are lots of things missing on course website. I think the prettier section can be improved. Even after copying your config files and installing it doesn't work.
@kushalmahajan the prettier config file works for me. Are you using VS Code with Prettier?
You need to add these settings to your VS Code user settings config:
"prettier.requireConfig": true,
"editor.formatOnSave": true,
Yes @1Marc. Turns out formatOnSave
was turned off. It was turned off since my last Vue project settings commit apparently in my dot files. Thanks!
I'm currently working through the State and Lifecycle Methods with React section of this course and I keep getting "Uncaught TypeError: Cannot read property 'value' of undefined" when trying to render the photos of the pets from the PetFinder API. Used diffchecker to see if my code matches up and I haven't found any inconsistencies.
I'm getting the same error as @evankilleen above
@ameapophenia I contacted FEM and it looks like the video content excludes a piece of code that fixes this TypeError. If you haven't already, look at the final version of the pet.js file and replace its content with yours and that should fix the issue. Also, I discovered in a later section (Using Context in Lifecycle Methods) that Brian remedies this issue.
Hey @evankilleen I don't know if this helps or if you got it figured out but I had the same issue. Some of the returned pets do not have photos, so it errors off. add:
let imgSrc = http://placecorgi.com/300/300
;
if (photos[0] && photos[0].value) {
imgSrc = photos[0].value;
}
inside the render(), before return, and that should take care of that error hopefully.
@AntonioSilvaDev I did eventually get it figured out, thanks!
Has anyone had issues with description from the API being but short? I cannot get the full description output.
Added babel-preset-react
to the docs: https://btholt.github.io/complete-intro-to-react-v4/async-and-events-in-react/
Thanks @camilaibs -- sorry this took so long to get to!
Hi teacher,
I just notice that on Chapter "Handling Events and Async UIs with React" from course's webpage is missing to install the
babel-preset-react
and configure it on .babelrc:https://btholt.github.io/complete-intro-to-react-v4/async-and-events-in-react/