Skip to content

Instantly share code, notes, and snippets.

@holladayian
Last active October 1, 2020 22:26
Show Gist options
  • Save holladayian/ff7aa2ca0bb11ca008dad0f6760b745e to your computer and use it in GitHub Desktop.
Save holladayian/ff7aa2ca0bb11ca008dad0f6760b745e to your computer and use it in GitHub Desktop.
Create a GitHub gist to answer these questions in as much detail as possible. Imagine someone is asking these questions in an interview (these are popular interview questions).
What is a "data model", and how does it relate to the DOM in a front-end application?
A Data model is what holds onto the state of an application. From this state, the Document Object Model (DOM) is updated to display a visual representation of the application.
What is a "framework?" And how does it differ from a "library?"
The main difference between a library and a framework is that with libraries, you have the ability to call the code, whenever you like, where as a framework calls your code, instead. This is known as "Inversion of Control".
Why should we consider using a framework over vanilla JS like you have been doing in mods 1 and 2?
Frameworks are based on components, have a strong community, have plenty of third party libraries, can utilize browser extensions that help with debugging, but most importantly they keep the UI in sync with the state.
What is a "component" in React? Why is it useful to have components?
Components are the building blocks of frameworks, like React. Essentially, they're widgets, or modules, but you can think of them as a collection of HTML, CSS, JS, & some internal data, specific to that component. Components are awesome because they have everything you need to make an application.
What is JSX?
JSX stands for JavaScript XML. This is a language compiled of other languages (JS, HTML, CSS). JSX preforms optimization while compiling the source code to JavaScript.
What are React "props?"
props are the data passed to the child component from a parent component. They are how we recieve state from a parent component.
What is React "state?"
In React, state is the object where you store property values that belong to a component.
What does "data down, actions up" mean in React?
Would it be incorrect to say this is event bubbling, but with data?
I understand the point is that is helps write cleaner, more reusable components, and can help avoid complex data loops, but I think that still follows the above statement. Not sure. Will do more research.
Before the due date, send a link to your gist to both of your instructors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment