Created
October 11, 2021 04:19
-
-
Save wmcguire18/548f8b043571f7078e396855b0f65d91 to your computer and use it in GitHub Desktop.
Mod-3-Intermission-Assignment.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
React Review: | |
What is a "data model", and how does it relate to the DOM in a front-end application? | |
ANSWER: The data model is composed of the scripts, classes, objects, methods that we use to build sites and apps in JavaScript. | |
Now, when the page is loaded, the browser creates a DOM (Document Object Model) constructed as a tree of objects. This allows us | |
to dynamically change all the elements and attributes of the page that we made in HTML and CSS, but now we can change them with | |
Javascript. It does this by basically translating everything in the page into an object, which JavaScript can then interact with. | |
What is a "framework?" And how does it differ from a "library?" | |
ANSWER: A framwork is a set of parameters used to get control over a library, and a framework can be useful to more than one | |
library. A library is dictated entirely by your code and is used to enhance accessibility and functionality. Your code calls | |
the library, so your code is in control. Your framework calls your code, so it dictates what works. | |
Why should we consider using a framework over vanilla JS like you have been doing in mods 1 and 2? | |
ANSWER: We use a framework to keep the UI in sync with the internal state of the application in a robust way. | |
The way we've been doing that before is time-consuming and fragile. | |
What is a "component" in React? Why is it useful to have components? | |
ANSWER: Components are the building blocks of React. It's a collection of HTML, CSS, JS, and some internal data specific | |
to that component. Data is either received from a component’s parent component, or it’s contained in the component itself. | |
The parent-child relationship of components makes them ideal for managing and manipulating data. | |
What is JSX? | |
ANSWER: JSX Allows us to write HTML like syntax which gets transformed to lightweightJavaScript objects. | |
What are React "props?" | |
ANSWER: Props are the data which is passed to the child component from the parent component. | |
What is React "state?" | |
ANSWER: State is the internal data store of a component. | |
What does "data down, actions up" mean in React? | |
ANSWER: First, “data down,” refers to the passing of data and/or functions via props from parent to child components. Data is sent down | |
to the child from the parent component with the help of props. Second, “action up,” refers to sending data back up to the parent | |
from the child component with the help of some action or event. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment