Setting up the environment Flashcards
What is the easiest way to create a react environment?
using npx create-react-app
What is necessary to have to run create-react-app?
Is is necessary nodejs
What npm stands for?
Node package manager
What does npx stands for?
Node package execute
What is npm eject?
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 to create a react environment without create-react-app? Where to find the full list and details?
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
Will “npm install” command install the package and its dependencies automatically?
Yes… all dependencies’ dependencies will automatically installer as well..
What is webpack? Why does it exist? Will browsers support it automatically?
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.
What is babel? What does it do?
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.
What is nodemon?
Allows node to refresh automatically in case of changes.
What is ESLint?
Checks if code is working and also checks for best practices including styling.
What is the difference between dependencies and devDependencies?
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;
What is prettier?
Make the react file auto indented.
What is the common extension of a file that configures a dependency?
.config.js
What is the reactful package?
Similar to create-react-app but with the bare minimum feature to make react work and also it ejects the modules by default.