Epic React

hello

First Tutorial
  • Learnt how you can list recommended vscode extensions
  • js to know for react
  • npm run test = npm test = npm t
  • npm run start = npm start
  • emojis's share expression across languages(that's why kent uses them a lot)
React Fundamentals
  • learnt how we can have empty body and still insert Hello world inside doc

  • learnt imperative vs declarative

    • SQL - declarative - just tells what I want not "how" to get it
    • pure js - imperative, react - declarative
    • many declarative approaches have some sort of underlying abstractions
    • Programming languages - imperative: C, C++, Java - Declarative: SQL, HTM - mix: Javascript, Python
    • React helps us create declarative UI
    • declarative code is program that can be context-independent (same code can be used in different programs)
    • functional programming is a subset of declarative programming
  • react - create react elements (like document.createElement()) -> React.createElement

  • reactDOM - render react elements to DOM (like rootElement.append())-> ReactDOM.render

  • you need babel to convert JSX to React APIs

    • see conversion at babel
  • understood what are react elements (objects that define how it should look on screen)

  • React.createElement, first argument can be a function

  • {{}} = JSX expression + object expression

Javascript open questions
  • js declarative way
    • filter, map, reduce
  • js imperative way
    • foreach
;