btholt / complete-intro-to-react-v4

The Complete Intro to React, as given for Frontend Masters
https://frontendmasters.com/learn/react/
1.14k stars 248 forks source link

Update documentation #11

Closed camilaibs closed 5 years ago

camilaibs commented 6 years ago

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/

kvedantmahajan commented 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.

1Marc commented 5 years ago

@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,
kvedantmahajan commented 5 years ago

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!

ghost commented 5 years ago

screen shot 2019-02-04 at 3 53 16 pm

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.

natesiggard commented 5 years ago

I'm getting the same error as @evankilleen above

ghost commented 5 years ago

@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.

AntonioSilvaDev commented 5 years ago

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.

ghost commented 5 years ago

@AntonioSilvaDev I did eventually get it figured out, thanks!

AntonioSilvaDev commented 5 years ago

Has anyone had issues with description from the API being but short? I cannot get the full description output.

1Marc commented 5 years ago

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!