Skip to content

Instantly share code, notes, and snippets.

@nathanielmillard
Last active October 2, 2020 17:29
Show Gist options
  • Save nathanielmillard/57de4830cfcd6ace32ac691ace083a0f to your computer and use it in GitHub Desktop.
Save nathanielmillard/57de4830cfcd6ace32ac691ace083a0f to your computer and use it in GitHub Desktop.
  • What is a "data model", and how does it relate to the DOM in a front-end application?

My understanding of a data model, is that it’s a referential variable or set of variables that are used to update the DOM. You first update the data model, and then update the DOM.

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

While a framework could be a collection of libraries, but more so libraries have less rules and restriction, and tend to more specifically encapsulate some functionality, and a framework will encapsulate how you will actually develop.

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

Frameworks allow for much more dynamic flexible code that operates faster.

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

Components are elements that will show up on the page, being rendered on the page by react.

  • What is JSX?

JSX is a helper language within react that allows developers to type out HTML elements in a javascript file.

  • What are React "props?"

Props are basically object oriented arguments that allow components to have much more flexible information while retaining the main aspects for how a component is structured.

  • What is React "state?"

State is the data a component maintains, and it is a mutable bit of information stored specifically on a class based component.

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

This means that data will be send down into child components from parent components, and actions will then be send back up to notify parent components of changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment