React Flashcards

1
Q

What is the “reactstrap” module?

A

It allow you to import Bootstrap components and use them as react components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In the MERN stack, what directory does the front end code reside in?

A

client

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In the MERN stack, where does the backend code reside?

A

In server.js (within root folder) and the routes directory.

Express and Mongoose are imported and the routes are within “./routes/api/items”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In the MERN stack, where does the production index.html file go (where “npm run build” looks)?

A

The “client/build” directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When creating a full stack MERN application, what should your entry point be?

A

server.js

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In the MERN stack, in which directory should you place your front end code?

A

client

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How should you create a React app in an existing project with back-end code already written?

A

cd client
npm i -g create-react-app
create-react-app .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How should you import React to a file?

A

import React, { Component } from ‘react’;

This allows for “Component” shorthand instead of “React.Component”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Where should React components be stored in a MERN stack application?

A

~/client/src/components/component

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

In React, what file holds the code for the main page?

A

App.js

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

In React, what is the syntax for rendering HTML from App.js?

A
class App extends Component {
    render() {
        return(
            div className="App"
        )
    };
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly