Skip to content

Instantly share code, notes, and snippets.

@QuinnrElder
Last active April 30, 2020 20:13
Show Gist options
  • Save QuinnrElder/6fb875c47ecc8f757354a0eddf8e6185 to your computer and use it in GitHub Desktop.
Save QuinnrElder/6fb875c47ecc8f757354a0eddf8e6185 to your computer and use it in GitHub Desktop.
## What is a "framework?" And how does it differ from a "library?"
- FRAMEWORK: A framework, or software framework, is a platform for developing software applications.
It provides a foundation on which software developers can build programs for a specific platform.
- LIBRARY: A library is a collection of precompiled routines that a program can use. The routines,
sometimes are called modules.
- Conceptually: Libraries have fewer rules than Frameworks & vice versa Frameworks have more rules
than Libraries. When working with libraries we are working with a collection of code, such as DocumentsObjectModle
or some functions that are all being packed together and used over and over again. Whereas a Framework, there
are more restrictive approaches and the Framework reaches out to the engineer's code v.s the engineer calling the
code (e.g. library)
## Why should we consider using a framework over vanilla JS?
- Frameworks allow us tho have a smooth UI transition between the updating of the data by " fetch() \ AsyncJS "
With vanilla JS, maintaining the UI in sync with the data involves writing a lot of tedious & fragile code.
And in the case of missing information, showing wrong information, or elements not responding to the user. We make the
transition to using Frameworks. By using Class Components & Functional Components we can break things down and combine
the HTML with JS. => "JSX — Allows us to write HTML like syntax which gets transformed to lightweight JavaScript objects."
## What is a "component" to React?
- Components are the building blocks of the React Framework. We can think of a component as a collection of HTML, CSS,
JS, and some internal data specific to that component. (e.g. State — 'The internal data store {object} of a component.')
## What are React "props?"
- "Props" or "Properties" are the data that is passed to the child components from the parent component.
## What is React "state?"
- "State" is the internal data storage {object} of a component.
## What does "data down, actions up" mean in React?
- "Data Down" refers to the passage of date from a Parent component to the Child Components through "props".
- "Actions Up" Now that we passed down the "Data Down". When we submit the form, the parent component needs
to be notified of the changes. The only way that we can send any changes or actions back up the component hierarchy is
by following the data down, action up rule.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment