Skip to content

Instantly share code, notes, and snippets.

@MarchCorbin
Last active June 25, 2020 21:09
Show Gist options
  • Save MarchCorbin/a2237a2ebe59ca18b0a72d42146cf4ea to your computer and use it in GitHub Desktop.
Save MarchCorbin/a2237a2ebe59ca18b0a72d42146cf4ea to your computer and use it in GitHub Desktop.
Pre mod3 deliverables

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

  • A framework has libraries preinstalled and is in charge of the flow of the application. When using a library the developer dictates the flow of execution for the app.

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

  • It is more efficient, uses less code and lets us design UI mechanics while laying out the basic XML. Using vanilla JS this is a 2-3 step process and using a framework we can boil it down to 1-2 steps to get functionality working.

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

  • A component is a reusable piece of code. It can take the form of a function or a class and can be used multiple times throughout an application.

What is JSX?

  • JSX is the new syntax we will be using for react and other frameworks. It is a blend of HTML and JS with optional CSS applications as well. It allows the developer to write both the elements and their functionality at the same time and within the same document.

What are React "props?"

  • Props are the equivalent to arguments or parameters when comparing to vanilla JS. Short for properties, props are used to pass in external information into a component. The rule with props is that their values can be used but should not be changed when using react.

What is React "state?"

  • A state is a value within a class component that allows the user to rerender an object dynamically based on a change in state. Using something with changing data such as a game board or a ticking clock would be examples of when a developer may employ a 'state'.

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

  • Data down Actions Up is a principle that says if you have an existing dataset that needs to be modified. It is best practice to create functionality that will modify the data for the specific application without mutating the original datasets themselves. This improves reusability for pieces of code and makes the code more component based and more clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment