Skip to content

Instantly share code, notes, and snippets.

@edwardkrupicka
Created November 26, 2021 23:55
Show Gist options
  • Save edwardkrupicka/86af80428ab3bd1442ac139af4b998f1 to your computer and use it in GitHub Desktop.
Save edwardkrupicka/86af80428ab3bd1442ac139af4b998f1 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?

  • A data model is the code in the framework, like objects and arrays. The DOM is the visual representation of that code, the UI.

What is a "framework?" And how does it differ from a "library?"

  • A library has a set of functions that you can call upon to manipulate your code while a framework is larger and you have to code according to the frameworks rules.

Why should we consider using a framework over vanilla JS like you have been doing in mods 1 and 2?

  • Vanilla JS is "harder" to use at times. Such as updating the DOM it takes a lot of vanilla JS code. With a framework it can be a lot easier and take a lot less lines of code with a framwork.

What is a "component" in React? Why is it useful to have components?

  • Components are reusable piecces of code that render HTML.

What is JSX?

  • JSX is a component that allows us to write HTML in React.

What are React "props?"

  • prop is an argument passed into React components

What is React "state?"

  • State refers to the structure and how the data changes on it. State tracks how the data changes.

What does "data down, actions up" mean in React?

  • It is the flow of data in React. Data is passed down from the parent component to the child component and that mutated data back to the parent component to update the DOM.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment