Understanding the Base Features & Syntax Flashcards
Optimized code means?
Small as possible. Increasing the performance of the app. (It increases the performance of the app)
Next-Gen JavaScript is…
ES6 and above
What are “dependencies”
third party packages
JSX
JavaScript rendition of HTML. Syntax extension to JavaScript.
What is the first and second parameter of the ReactDOM.render();
ReactDOM.render(What do I want to render, Where do I want to render it);
JSX produces React ______.
elements
What is the boilerplate for importing react?
import React from “react”
import ReactDOM from “react-dom”
SPAs
Single Page Applications
MPAs
Multi Page Applications
npm or yarn is an example of?
Dependency Management Tools
What is a compiler?
a conversion software that converts next-gen javascript to older version so it runs on any browsers that the user is on.
Babel is an example of?
Compiler
npm start
starts the development server
npm run build
Bundles the app into static files for production
npm test
Starts the test runner
npm run eject
Removes this tool and copies build dependencies, configuration files and scripts into the app directory. (If you do this, you can’t go back!)
What is a React Component?
A component is either a Function or a Class that produces HTML to show the user using JSX and handles feedback from the user using event handlers.
How do you start a React app?
Run npm start in the project directory
How do you create a React app?
In the terminal: create-react-app project-name
T or F: Every react component has to return or render some html code which can be rendered.
True
createElement() is a method that takes at least __ arguments.
3.
Argument 1: The element we want to render to the dom
Argument 2: The configuration for 1
Argument 3: Any amount of children (Whats nested under argument 1.
Function names in components should be uppercased or lowercased?
lowercased
T or F: When you’re importing a component, the name should be the same as the component file.
True
What are Props?
Changes from outside the component(data passed into component)
eg.)