JS and React.js Flashcards
To learn technical jargon
Linting
Software that screens code for syntax errors while differentiating various elements of code
I.D.E.
Integrated Development Environment
D.O.M.
Document Model Object
What must every component do?
*Render some code to the DOM
What 3 arguments are accepted by .createElement?
1) HTML Element
2) Configuration (JS object)
3) Children of Element
Var vs Const
Var: can change
Const: data never changes
Functional Components are written
const cmp = () => { return <div>some JSX</div> }
Class Components are written
class Cmp extends Component { render () { return <div>some JSX</div> } }
Dynamic Code within a JSX Element must be wrapped in?
Single curly braces:
{ dynamic code }
Children
Any Element that is contained between a Components opening and closing tags
Props
Used to dynamically pass code from parent components to child components
Dynamic Code
Not hard coded, code easily able to change
State
Is managed from within a component and if changed will cause a re-render.
Handlers
Class methods that are not actively being called but is triggered by an event
Should State should be mutated?
No