What is a "data model", and how does it relate to the DOM in a front-end application?
- The data model is the code that holds, manipulates and otherwise manages the state of a site. The DOM is populated using information stored within the data model.
What is a "framework?" And how does it differ from a "library?"
- A framework is an environment imported into JS that defines a program's architecture. A library is imported code that adds functionality into JS.
Why should we consider using a framework over vanilla JS like you have been doing in mods 1 and 2?
- Modularity, expanded syntax and functionality, improved synchronization between the UI and the data model/state.
What is a "component" in React? Why is it useful to have components?
- Components are akin to functions in JS, which return elements to be rendered. Multiple Components help with SRP and help keep code more modular and flexible.
What is JSX?
- It is a part of React that allows HTML-like syntax to be used within JS.
What are React "props?"
- Props are arguments passed into React components.
What is React "state?"
- State refers to the parts of an app that can change and need to be up to date on the DOM.
What does "data down, actions up" mean in React?
- Data should be passed down from the state to child components via props. Actions such as events should travel up from children through parents and where they can alter the state, which is then passed back down to children.