Skip to content

Instantly share code, notes, and snippets.

@hborrelli1
Last active March 13, 2020 21:41
Show Gist options
  • Save hborrelli1/3bd4be6e2a8632bdbf667664394d547e to your computer and use it in GitHub Desktop.
Save hborrelli1/3bd4be6e2a8632bdbf667664394d547e to your computer and use it in GitHub Desktop.

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

  • A Framework is a bit of code that dictates the architecture of your project. A Library includes pre-written code or methods that you can access and integrate into your project.

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

  • The main benefit of a Framework is that it helps the UI in sync with the state or data.

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

  • A react components are basically just JavaScript functions that utilize/accept props to render elements to the DOM. Components can be functional (only used to render elements) or Class based (which can constrol their own state).

What are React "props?"

  • Props is short for Properties. Props allow you to pass data from one component to another.

What is React "state?"

  • State in React is an object that represents the parts of an app. These change change and state can be modified by use of certain methods such as setState().

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

  • Data Down refers to passing information down from a parent component to a child component. The Child compenent uses the data that was passed down to update something. That data is then passed back up to the parent data to update its state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment