React Notes

*Just some gibberish notes I took about React

The Birth of React

* came out in 2013
* before there was JS, HTML, CSS
*  browsers worked differently so had to implement it on JS
* JQuery worked through all browsers
* BackBonejs organize big JS files
* SPA - single page application
* Before when going to a new page, browser requested new HTML, CSS, JS
   ・but now JS manipulates the HTML without requesting
* AngluarJS had containers that wrapped projects
* Model View Controller each js file divided to different things
* FB used to use AnglularJS
* FB came up with React

Declarative vs Imparative
   - Success of React
      ・Don't touch the DOM. Ill do it (React).
         - Imparative -> directly change individual parts of the app in response to events
         - Difficult relationship between events and DOM
         - React - tell me what the page should look like
            - make changes with "state"
         - Declarative -> this is the "state" change DOM
         - DOM "reacts" to the state

      ・Build websites like lege blocks
         - Reusble components
            - componets on components on components
            - components are js function that receieve attributes
            -

      ・Unidirection Data Flow
         - Data can only flow in one direction (to its childern components?)
         - easy to debug code

      ・Im just a UI(React)
         - use compoents to make ui, use other modules for the app to interact

   - Be good react developer
      ・Decide on components
      ・Decide the state and where it lives
      ・What changes when state changes