Setting up the environment Flashcards

1
Q

What is the easiest way to create a react environment?

A

using npx create-react-app

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

What is necessary to have to run create-react-app?

A

Is is necessary nodejs

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

What npm stands for?

A

Node package manager

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

What does npx stands for?

A

Node package execute

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

What is npm eject?

A

It will stop hiding what it’s got installed under the hood by create-react-app and instead eject those things into your project’s package.json for everyone to see

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

How to create a react environment without create-react-app? Where to find the full list and details?

A

create a new dir and then do a npm init -y, after that install depenencies (e.g: express, react and react-dom, webpack, webpack-cli and babel , nodemon, ESLint )

Full list and details can be found at: jscomplete.com/reactful

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

Will “npm install” command install the package and its dependencies automatically?

A

Yes… all dependencies’ dependencies will automatically installer as well..

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

What is webpack? Why does it exist? Will browsers support it automatically?

A

webpack bundles all the packages together in a single bundle file to be able to send to the browser. It exists because browser do not support it but seems that will support at some point.

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

What is babel? What does it do?

A

Babel is another module necessary for react. It translates JSX to React-API calls. Also guarantee backward compatibility of new JS features with older browsers.

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

What is nodemon?

A

Allows node to refresh automatically in case of changes.

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

What is ESLint?

A

Checks if code is working and also checks for best practices including styling.

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

What is the difference between dependencies and devDependencies?

A

dependencies are required by the production server and development environment and devDependencies is only necessary for development environment and CI/CD - won’t go to production;

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

What is prettier?

A

Make the react file auto indented.

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

What is the common extension of a file that configures a dependency?

A

.config.js

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

What is the reactful package?

A

Similar to create-react-app but with the bare minimum feature to make react work and also it ejects the modules by default.

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

How to make vs code format on save?

A

There’s a setting called Format On Save that executed prettier automatically.

17
Q

What is the scss extension?

A

It is the sass css file…. normal css also fits here.

18
Q

How to separate components into separated files?

A

By creating the files and exporting the component itself (object). After that is necessary to import it in the other files.

19
Q

What is the syntax to export the component (object)? And what is the syntax to import it again?

A

export default PlayNumber;

Import PlayNumber from “./PlayNumber”

20
Q

Where to find more games to build with react?

A

jscomplete.com/react-beyond-basics

21
Q

What is recommended to use when using React with APIs? Is there a course on Pluralsight?

A

To use GraphQL. Same has a course on pluralsight.

22
Q

What are the common webpack properties that need to be declared?

A

Output, devserver, plugins, module and loaders.