Skip to content

Instantly share code, notes, and snippets.

@Leasw144
Last active August 14, 2020 21:52
Show Gist options
  • Save Leasw144/6119415d696bd32c024f10e5100da476 to your computer and use it in GitHub Desktop.
Save Leasw144/6119415d696bd32c024f10e5100da476 to your computer and use it in GitHub Desktop.
Mod 3 Prework

Instructional Deliverables (Due Last Friday 5pm of Intermission Week)

What is a "data model", and how does it relate to the DOM in a front-end application?

A data model is a repository of all of the information we may want to hold for our application. The DOM is the representation of the data model that is accessbile to users via their browswer.

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

As one person put it, the library is the mother, the framework is the father; frameworks generally have more rules and restrictions of where to use their code. Additionally, frameworks will eventually need to reference or 'ask' its library at some point in order for it to do anything with it. A library on the other hand is readily accessible no matter most situations and we can directly reference its functionality.

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

The main purpose of a framework is so that it keeps the UI in sync with the state/data being manipulated. Doing so in Vanilla JS can be complicated on anything even slighly complex and even doing it successfully, resembles something of a framwork anyway.

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

A component is code that is used in react that is reusable and can be used to render html code to the DOM via JSX or manipulate data in some way that can be represented on the DOM. If you code it dynamically, it allows you code that is reusable. Additionally, because one component can be used with smaller components within it, at the top level, reading through code becomes easier as that top level component (sometimes called an App) may act as a table of contents for the reader

What is JSX?

JSX is what React uses to allow us to write HTML in javascript. Without React, anything that looks like html will not be interpreted as such. It is HTML code in Javascript clothing.

What are React "props?"

Props are properties that get passed from one component to another as arguments and are generally passed down from parent to child components

What is React "state?"

State is where the data we want to affect is being stored. Ideally, anytime the 'state' or the data model changes, we want to re-render that information as it is represented on the virtual dom

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

Data down, action up has to do with how data is passed down from a parent component to a child component and then having the child use that data in some way that notifies the parent element.

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