Skip to content

Instantly share code, notes, and snippets.

@Trond240
Last active March 13, 2020 19:52
Show Gist options
  • Save Trond240/82529f934d22a64dc3f17f39ecbf0d00 to your computer and use it in GitHub Desktop.
Save Trond240/82529f934d22a64dc3f17f39ecbf0d00 to your computer and use it in GitHub Desktop.

Mod 3 Pre Work

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

A libraray is a collection of class definitions. Key reason is for code reuse that has been already written by other developers. In a framework all the control flow is already there but there is a lot of white spots that shuld be filled out by our own code. Defines the skeleton where the application defines the its own features to fill out the skeleton.

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

We should consider using a framework because of State-based UI rendering, in particular “live” data that results in small changes rather than an entirely new UI.

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

Components are the building blocks of React. They are a collection of HTML, CSS, JS, and some internal data spacific to that component. They are useful because they are everything we need bundled up into a small package that connects to make a bigger picture.

What are React "props?"

The data in which is passed to the child component from the parent.

What is React "state?"

The internal store (object) of a component.

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

Describes a common pattern which imphasizes unidirectional data flow. In other words "passing data" from one part of the app down to other parts of the applications layers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment