Skip to content

Instantly share code, notes, and snippets.

@JRicardoT
Last active November 29, 2021 16:18
Show Gist options
  • Save JRicardoT/98c8f849d0c8cfcbbdc3357b771e7c8b to your computer and use it in GitHub Desktop.
Save JRicardoT/98c8f849d0c8cfcbbdc3357b771e7c8b to your computer and use it in GitHub Desktop.
  1. What is a "data model", and how does it relate to the DOM in a front-end application?
  • The data model is the source of truth of an application. As the data model updates, the DOM reflects these changes which displays everything the user sees.
  1. What is a "framework?" And how does it differ from a "library?"
  • A library is pieces of reusable code or tools that can be used by the developer wherever and whenever it is needed with a few rules. A framework is more strict, has more rules, and it is like a platform to build applications.
  1. Why should we consider using a framework over vanilla JS like you have been doing in mods 1 and 2?
  • A framework allows us to write more complex and efficient applications. It is also easier to mantain after the state changes.
  1. What is a "component" in React? Why is it useful to have components?
  • A component is a reusable piece of code. It is a function that returns a single JSX element. You usually store each component into its own file to help keep them organized.
  1. What is JSX?
  • A syntax extension that allows us to directly write HTML-like elements within a JavaScript file.
  1. What are React "props?"
  • Props is a parameter of a component function that is passed in as a property object. Props are immutable. The arguments are passed in like HTML attributes.
  1. What is React "state?"
  • It is an object built in components that stores the information about a component's current status.
  1. What does "data down, actions up" mean in React?
  • Data down means that parent component passes its data down to its children.
  • Action up means that when that when something happens on a child component it passes the information up to its parent component.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment