React

Overview

https://legacy.reactjs.org/tutorial/tutorial.html#what-is-react

Documentation

https://react.dev/

Features

  1. Alternatives: Angular, Vue, Svelte
  2. Components
    1. https://react.dev/reference/react/Component
    2. Independence
    3. Reusability
    4. Speed

File/Folder structure

  1. public
    1. Contains static assets including index.html (page template)
      1. index.html
      2. title
      3. fonts
      4. css
      5. favicon
      6. id=“root” - our entire app
        1. We don’t create html pages with React.
        2. React lets us work with Single page application.
        3. The whole application exists inside of one single html file - which is <project-root>/public/index.html
        4. In this file, there is a single div with the id=root: <div id="root">
        5. React will grab all the code we write with javascript in src and puts everything inside this <div>
  2. src
    1. In simplest form it’s the brain of our app. This is where we will do all of our work. src/index.js is the JavaScript entry point.

TODO

  1. https://stackoverflow.com/questions/52242977/react-show-block-with-information-on-hover
  2. https://github.com/facebook/react/issues/20483
  3. https://stackoverflow.com/questions/33257275/infinite-loop-in-react-button
  4. https://stackoverflow.com/questions/57491815/how-to-reset-select-dropdown-values-in-react

Links to this note