Flashcards in Understanding the Base Features & Syntax Deck (47)
Optimized code means?
Small as possible. Increasing the performance of the app. (It increases the performance of the app)
ES6 and above
What are "dependencies"
third party packages
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 ______.
What is the boilerplate for importing react?
import React from "react"
import ReactDOM from "react-dom"
Single Page Applications
Multi Page Applications
npm or yarn is an example of?
Dependency Management Tools
What is a compiler?
Babel is an example of?
starts the development server
npm run build
Bundles the app into static files for production
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.
createElement() is a method that takes at least __ arguments.
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?
T or F: When you're importing a component, the name should be the same as the component file.
What are Props?
Changes from outside the component(data passed into component)
React is a library for creating _______.
A typical React app could be depicted as a component tree- having one ____ component("App") and then an infinite amount of nested child components.
Each React component needs to return/render some ____ code.
T or F: JSX is HTML
When creating a component, what are the two different ways?
1. Functional components
2. Class-based components