Skip to content

Instantly share code, notes, and snippets.

@faceyspacey
Created February 26, 2018 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save faceyspacey/229319b9b7cc9c07188e6d9f313bafef to your computer and use it in GitHub Desktop.
Save faceyspacey/229319b9b7cc9c07188e6d9f313bafef to your computer and use it in GitHub Desktop.
TERMS:
- inheritance (super)
- imperative vs. declarative
- managed inputs vs unmanaged inputs (make sure when you google prepend "react"):
https://reactjs.org/docs/uncontrolled-components.html
- "pure functions"
https://hackernoon.com/react-stateless-functional-components-nine-wins-you-might-have-overlooked-997b0d933dbc
https://www.sitepoint.com/functional-programming-pure-functions/
https://en.wikipedia.org/wiki/Pure_function
const pureFunction = (a, b) => {
return a + b
}
// getting impure function
const impureFunction = (a, b) => {
return a + b + window.history.entries.length
}
// setting impure function
const impureFunctionB = (a, b) => {
window.foo = a + b
return a + b
}
"SIDE EFFECTS"
- React Parent To Child Communication
- https://reactjs.org/docs/lifting-state-up.html
https://www.google.com/search?q=react+parent+to+child+communication&oq=react+parent+to+child&aqs=chrome.0.0j69i57j0l4.4566j0j7&sourceid=chrome&ie=UTF-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment