Skip to content

Instantly share code, notes, and snippets.

@isleofyou
Created November 28, 2021 18:15
Show Gist options
  • Save isleofyou/c4cb9ab428ac834cce3cb642040ccced to your computer and use it in GitHub Desktop.
Save isleofyou/c4cb9ab428ac834cce3cb642040ccced to your computer and use it in GitHub Desktop.
Mod 3 Prework
What is a "data model", and how does it relate to the DOM in a front-end application?
The data model is the single source of truth for what should display on the page. As the data model is updated, the DOM changes to reflect these changes. For example, adding an item to your cart on a shopping website will show a new number on the car.
What is a "framework?" And how does it differ from a "library?"
A framework is the platform in which you develop software applications. It can include libraries which include chunks of reusable code.
Why should we consider using a framework over vanilla JS like you have been doing in mods 1 and 2?
Frameworks like React have built in functionality that can greatly assist when building programs. Vanilla JS is like building a fire from sticks. React is camping and it includes a lighter ;)
What is a "component" in React? Why is it useful to have components?
Componets are the building blocks of React apps and are JS classes or functions that tell React what a page should look like.
What is JSX?
JSX stands for Javascript XML. It allows HTML to be written in React.
What are React "props?"
Props are arguments passed into React components via HTML attributes.
What is React "state?"
State is a plain JavaScript object used by React to represent an information about the component's current situation. It's managed in the component (just like any variable declared in a function).
What does "data down, actions up" mean in React?
Compenets can have children and parents. Data down means the parents pass information down to the children. Actions up means information is passed up to parents.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment