Understanding the Base Features & Syntax Flashcards Preview

Front-End: React JS > Understanding the Base Features & Syntax > Flashcards

Flashcards in Understanding the Base Features & Syntax Deck (47)
Loading flashcards...
1

Optimized code means?

Small as possible. Increasing the performance of the app. (It increases the performance of the app)

2

Next-Gen JavaScript is...

ES6 and above

3

What are "dependencies"

third party packages

4

JSX

JavaScript rendition of HTML. Syntax extension to JavaScript.

5

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);

6

JSX produces React ______.

elements

7

What is the boilerplate for importing react?

import React from "react"
import ReactDOM from "react-dom"

8

SPAs

Single Page Applications

9

MPAs

Multi Page Applications

10

npm or yarn is an example of?

Dependency Management Tools

11

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.

12

Babel is an example of?

Compiler

13

npm start

starts the development server

14

npm run build

Bundles the app into static files for production

15

npm test

Starts the test runner

16

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!)

17

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.

18

How do you start a React app?

Run npm start in the project directory

19

How do you create a React app?

In the terminal: create-react-app project-name

20

T or F: Every react component has to return or render some html code which can be rendered.

True

21

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.

22

Function names in components should be uppercased or lowercased?

lowercased

23

T or F: When you're importing a component, the name should be the same as the component file.

True

24

What are Props?

Changes from outside the component(data passed into component)
eg.)

25

React is a library for creating _______.

components

26

A typical React app could be depicted as a component tree- having one ____ component("App") and then an infinite amount of nested child components.

root

27

Each React component needs to return/render some ____ code.

JSX

28

T or F: JSX is HTML

False. JSX is a syntactic sugar for JavaScript, allowing you to write HTMLish code instead of nested React.createElement(...) calls.

29

When creating a component, what are the two different ways?

1. Functional components
2. Class-based components

30

What are Functional Components?

aka presentational, dumb, or stateless components.

const cmp = () => {
return
some JSX
}
}


* often used- best practice