Complete React: Part 1

06 Aug 2018

I'm now currently working through the Complete React Course by Andrew Mead on Udemy.

It's helping reinforce previous lessons learnt from Codeacademy and FreeCodeCamp.

Some notes I've made so far:

If you reference an object within a JavaScript expression, it doesn't know what to do with it so you get an error.

'Objects are not valid as a React child' in the console.

To display anything, you need to refer to a property in the object, i.e user.name

.map is better than forEach as we can transform an array into a new one.

it is better to reference functions than to add them directly in JSX to an element inline. Easier to read.

Objects are not supported in arrays in JSX.

You can render an array in JSX into another JSX expression.

Here is the collection of codepens created while working through this course.