Skip to content

Instantly share code, notes, and snippets.

@st0nebreaker
Last active June 25, 2020 15:44
Show Gist options
  • Save st0nebreaker/3d3dfee7313f6dedd1f82f677f365470 to your computer and use it in GitHub Desktop.
Save st0nebreaker/3d3dfee7313f6dedd1f82f677f365470 to your computer and use it in GitHub Desktop.
  • What is a "framework?" And how does it differ from a "library?"

    • A framework a reusable software environment that assists in creating the functionality in a large codebase for the development of software applications. Libraries are smaller than frameworks and contain less rules. Libraries are made for common code solutions. Frameworks are much more complex, with more strict rules and processes for the code.
  • Why should we consider using a framework over vanilla JS like you have been doing in mods 1 and 2?

    • Frameworks are less "brittle" than vanilla JS. They enable code that's easier to maintain because much less lines of code are needed.
  • What is a "component" in React? Why is it useful to have components?

    • In React, components are standalone parts of an application responsible for one UI element. A component can be a functional or class component, the class components have more functionality. Class components use inheritance to extend the native 'Component' class from React. They keep track of data and help update or change the data, before it updates the DOM display.
  • What is JSX?

    • JSX is the mixture of JavaScript and XML. It renders HTML components in the midst of the JavaScript file.
  • What are React "props?"

    • Short for "Properties", this is an object given from it's parent component. It should be immutable. Props allow for unique instances of a UI element to be created based off the data given (props).
  • What is React "state?"

    • The State stores the data from the current page. It is mutable and changes throughout a user's interactivity with the application. The state of a component cannot be accessed by it's child component, but it can be passed down in a prop.
  • What does "data down, actions up" mean in React?

    • Data down, actions up mean that all data from state and props are sent down to the children to inform their rendering. When an action takes place on the DOM via the child, that action must be sent up to the parent to change the data so the DOM can reflect the change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment