Skip to content

Instantly share code, notes, and snippets.

@jordy1611
Last active August 14, 2020 21:33
Show Gist options
  • Save jordy1611/f55a785911255be7d59993d97142d7fc to your computer and use it in GitHub Desktop.
Save jordy1611/f55a785911255be7d59993d97142d7fc to your computer and use it in GitHub Desktop.
Pre work

Mod 3 Pre Work Jordan Shryock

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

  • The data model is the stored information or data that the application uses. It can be stored locally but is usually stared on servers when using web apps. The data model has no functionality, it is only stored information.
  • The data model is the information/data the DOM accesses in order to properly display the webpage.

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

  • A framework is a collection of pre-written code that aids developers with routine/monotonous programming and tasks. It's essentially premade software that makes a very common coding task easier to do.
  • Libraries and frameworks are similar however a framework has significantly more rules and restrictions. Any part of a libary can be accessed and used by a developer whenever they want. Frameworks are very restricted in their usage. When dealing with a framework; the framework, not the user accesses the library.

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

  • Frameworks have a lot of premade functionality which makes a lot of the tedious and monotonous tasks involved in vanilla Js.
  • Using a framework makes the code more organized and easier to read.
  • If using React, the UI doesn't have to be completely reconstructed when one small element is added. React takes care of all the functionality to display the one small addition in the background so that the user does not have to write code to redisplay all UI components.

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

  • A component is a Javascript function (class) that takes in optional inputs and outputs a React component.
  • Compenents are the building blocks of react. They are classes/functions that handle sections of the webpage.

What is JSX?

  • JSX allows us to write HTML in Javascript through React.

What are React "props?"

  • Props in React are properties of components used to pass information from one compenent to another.

What is React "state?"

  • The state are the parts of the app that can change. When a new state is set that component state is re-rendered.

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

  • The parent element does almost all of the acting/functioning in React. The child element is used to store some data and notify the parent that something has happenned.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment