General Concepts Flashcards

1
Q

Synchronous operations

A

are executed one at a time, and each operation must complete before the next one can start. In other words, synchronous operations block the execution of the program until they are finished.

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

asynchronous operations

A

do not block the execution of the program. Instead, they are designed to allow the program to continue executing other tasks while waiting for the asynchronous operation to complete.

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

purpose of a callback

A

to specify a function that will be executed or called at a later point in the program, often as a response to an event or the completion of an asynchronous operation.

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

setState what is does? is syncronic?

A

When you call setState, React will update the state object and trigger a re-rendering of the component, which means the component will update and reflect the new state.

The setState method in React is typically asynchronous. This means that calling setState doesn’t immediately update the state and re-render

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

this.state = {
counter: 0,
name: ‘John’
}; how to access to counter state?

A

this.state.counter holds the value of the counter, and this.state.name holds the value of the name.

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

when getDerivedStateFromProps is called?

A

getDerivedStateFromProps is a static method that is called before rendering and is invoked whenever the component is receiving new props or state updates.

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

getDerivedStateFromProps method for funtions?

A

It should be used for pure calculations based on props and state, without relying on any component-specific instance variables or methods.

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

can I use this in getDerivedStateFromProps?

A

is a static method, so you cannot access the this keyword or the component instance within this method

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

why getDerivedStateFromProps is static?

A

By making it static, it is enforced that the method does not have access to the component instance (this) and cannot modify any instance-specific data or invoke instance methods. meaning its output solely depends on the inputs and does not have any side effects.

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

what is a static method?

A

A static method in JavaScript is a method that belongs to a class itself rather than to an instance of the class.

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

what is a class?

A

a class is a template for creating objects of a particular type. It defines the properties (attributes) and behaviors (methods) that the objects instantiated from the

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

How to cretae an instance of this class?

class Person {
constructor(name, age) {
this.name = name;
this.age = age;
}

sayHello() {
console.log(Hello, my name is ${this.name} and I am ${this.age} years old.);
}
}

A

const person1 = new Person(‘John Doe’, 25);
person1.sayHello();

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

Which are the propertes and methos od this object?

const person = {
name: ‘John Doe’,
age: 25,
sayHello: function() {
console.log(Hello, my name is ${this.name} and I am ${this.age} years old.);
}
};

A

In this example, the person object has two properties (name and age) and a method (sayHello).

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

is a class intance same as an object?

A

Yes, in the context of object-oriented programming, a class instance and an object are essentially the same thing.

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

what is object-oriented programming?

A

Object-oriented programming (OOP) is a programming paradigm that organizes code based on the concept of objects, which are instances of classes.

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

what is a stack
/pila?

A

a stack is an abstract data type that represents a collection of elements with a particular behavior known as last-in, first-out (LIFO). It is named “stack” because it resembles a stack of objects where new items are added to the top and removed from the top.

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

three main phases of react lifycle

A

mounting, updating, and unmounting.

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

4 methods of mounting phase

A

constructor()
static getDerivedStateFromProps()
render()
componentDidMount()

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

5 methods of Updating phase

A

static getDerivedStateFromProps()
shouldComponentUpdate()
render()
getSnapshotBeforeUpdate()
componentDidUpdate()

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

1 method of Unmounting phase

A

componentWillUnmount()

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

what are the purpose of hooks?

A

Hooks are a feature that allows developers to use state and other React features in functional components without the need for class components.

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

what is jest?

A

Jest is a popular JavaScript testing framework developed by Facebook.

Jest is a testing framework that provides the overall test running infrastructure. It provides functionalities such as organizing your tests into suites and test cases, providing test doubles (mocks, spies, etc.), measuring code coverage, and offering utilities for assertions. Jest does not tie you to a specific way of testing and can be used with various testing approaches and libraries.

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

what is enzyme?

A

Enzyme is a JavaScript testing utility developed by Airbnb that provides additional testing capabilities for React components. It is often used in conjunction with Jest or other testing frameworks to facilitate the testing of React components in isolation. As of September 2020, Airbnb has officially announced that Enzyme development and maintenance have been discontinued.

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

what is react testing library?

A

React Testing Library is a popular testing utility for React applications that promotes testing React components in a way that resembles how users interact with the application. It emphasizes testing components based on their rendered output and behavior rather than focusing on implementation details.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
prevState vs prevProps
prevState represents the previous state of a component, while prevProps represents the previous props of a component.
26
what is is truthy? 6
true: The boolean value true is obviously truthy. Non-empty strings: Any string that contains at least one character is considered truthy. Non-zero numbers: Any number that is not zero (positive or negative) is considered truthy. Objects: Any object, including arrays and functions, is considered truthy. Arrays: Arrays are objects in JavaScript, so they are also considered truthy. Functions: Functions are objects as well and are considered truthy.
27
you can use square brackets [] to enclose the elements of .....
an array
28
you can use curly braces {} to enclose ....
an object. const myObject = { name: 'John', age: 25, city: 'New York', isStudent: true, };
29
what is a fetch?
fetch is a built-in function used to make asynchronous network requests and retrieve resources from a specified URL. The fetch function takes a URL as its first argument and returns a Promise that resolves to the response of the request.
30
how is a fetch structure? 3 parts
fetch(url) .then(response => { // Handle the response }) .catch(error => { // Handle any errors });
31
what is response.json in a fetch?
In the fetch function, the response.json() method is used to extract the response data as JSON. It returns a Promise that resolves to the parsed JSON data from the response body. fetch('https://api.example.com/data') .then(response => response.json()) .then(data => { // Handle the parsed JSON data console.log(data); }) .catch(error => { // Handle any errors console.error('Error:', error); });
32
how is the json format?
it variaety that is why we have JSON.stringify() function is used to convert JavaScript objects into JSON strings, while JSON.parse() is used to parse a JSON string and convert it into a JavaScript object.
33
what is a script?
A script is typically used to automate tasks or perform specific operations. It can be written to interact with a system, manipulate data, control the behavior of a program, or perform various other functions. Popular scripting languages include JavaScript, Python, Ruby, Perl, Bash, PowerShell, and many others.
34
give an example of a class and class intances with a car
class Car: def __init__(self, make, model, year): self.make = make self.model = model self.year = year def display_info(self): print(f"Make: {self.make}, Model: {self.model}, Year: {self.year}") Creating car instances car1 = Car("Toyota", "Camry", 2020) car2 = Car("Honda", "Civic", 2018) car3 = Car("Ford", "Mustang", 2022)
35
Are objects same as class?
Objects are instances of a class created with specifically defined data. Objects can correspond to real-world objects or an abstract entity.
36
How does fetch works with a promise?
To get data using promises in JavaScript, you typically use the fetch() function, which returns a promise that resolves to the response of the HTTP request. fetch('https://api.example.com/data') .then(response => response.json()) // Parse the response as JSON .then(data => { // Work with the data console.log(data); }) .catch(error => { // Handle any errors that occurred during the request console.error('Error:', error); });
37
¿Qué es ESLint?
ESLint es una herramienta de código abierto enfocada en el proceso de "lintig" para javascript (o más correctamente para ECMAScript). ESLint es la herramienta predominante para la tarea de "limpiar" código javascript tanto en el servidor (node. js) como en el navegador. "Linting" es un proceso que se realiza en la etapa de desarrollo para verificar el código y encontrar cualquier problema potencial. Un "linter" es una herramienta que se usa en este proceso. El linter realiza varias comprobaciones en el código, como la detección de errores de sintaxis, errores de formato, errores de estilos de codificación y otros problemas posibles. Un linter muy popular para JavaScript es ESLint. Puedes personalizar las reglas de ESLint según tus necesidades, lo que significa que puedes definir tus propios estándares de estilo de código y hacer que ESLint verifique el código en consecuencia.
38
What is npm?
npm comes bundled with it. With npm, you can: Author your own Node.js modules ("packages"), and publish them on the npm website so that other people can download and use them Use other people's authored modules ("packages") So, ultimately, npm is all about code sharing and reuse. You can use other people's code in your own projects, and you can also publish your own Node.js modules so that other people can use them.
39
Que es deploy?
Deployment is the mechanism through which applications, modules, updates, and patches are delivered from developers to users.
40
What package.json is?
The package. json file is the heart of any Node project. It records important metadata about a project which is required before publishing to NPM, and also defines functional attributes of a project that npm uses to install dependencies, run scripts, and identify the entry point to our package.
41
3 things to do with new code in j***s
The methods used by developers to build, test and deploy new code.
42
Code in dev
-You can check which git commit the code has been put in dev from.
43
Dev enviroment
A development environment in software and web development is a workspace for developers to make changes without breaking anything in a live environment.
44
Production enviroment
A production environment is a real-time setting where the latest versions of software, products, or updates are pushed into live, usable operation for the intended end users.
45
You deploy to...
enviroments.... could be dev, uat, uat2...
46
What does j***s does?
you can deploy, is a pipeline that has a code commit source, then a build, a test and a deply to the desire enviroment.
47
What are props? aka properties
which stands for properties and is being used for passing data from one component to another. But the important part here is that data with props are being passed in a uni-directional flow. IMMUTABLE BY CHILDS
48
What is a state?
The state is a built-in React object that is used to contain data or information about the component. A component's state can change over time; whenever it changes, the component re-renders.
49
When a components re-renders?
React components automatically re-render whenever there is a change in their state or props.
50
CONTEXT API- useContext to avoid props drilling porblems to super grand childrends :(, like red hairs!
for global states
51
Example of useContext dark/light theme in an website
affect all the components and all components should known the state. Is a GLOBAL STATE. SHARE Global data :) Tipical, userPermission according to id
52
GLOBAL STATES: You need (3)
-create a context -useContext -provider for the context -then you can access from x component to that needed state of the context. -you create a global state
53
theme.provider or x.provider. What it does?
The Provider component accepts a value prop to be passed to consuming components that are descendants of this Provider.
54
memoization,   const value = useMemo(() => ({a, b}), [a, b]); what is for?
avoiding unnecessary rendering when two props are the same but different objects
55
Statefull component
Needs states, just like input of my fav coutries to live in!
56
Stateless component
dosent have states, it could use props!
57
props drilling! We hate... we fix with...
useContext :)
58
uncontrolled component
is a component that maintains its own internal state. No component re-renders. Browser DOM handles the changes to the element. If you are using a form, you are NOT using setState to capture input. Instead you could be using useRef hook to capture node value, current.value. Is an state matain by the DOM
59
controlled component
a controlled component is a component that is controlled by React state. Ex. form input use UseState to update input values and save it as internal state of the component
60
array destructuring Example :)
Destructuring the array in JavaScript simply means extracting multiple values from data stored in objects and arrays
61
object destructuring
Destructuring the array in JavaScript simply means extracting multiple values from data stored in objects and arrays
62
object destructuring
63
array of objects, how to write it?
const array = [ {id:1, name: "Peter"}, {id:2, name: "John"} ]
64
how to map over an array of objects and show the name? {asianCountries.map(( x, y )=>
    {xxx}
)}
{asianCountries.map((country, id )=>
    {country.name}
)} order of country and id, country.name
65
4 basic html things for a form:
1. form 2. label 3. input 4. button
66
useState hook from React, what is and what returns?
is a function that returns an array with two elements: the current state value (in this case, an object representing a car) and a function to update that state (in this case, setCar).
67
what is APi?
es una interfaz que te permite "comunicar" cosas que hablan diferentes. Ej celular tipeo. Las APIs comunican programas/sistemas entre si. Ejemplo integraciones, fb con ig, misma publicación. Un API es un programa para ser usado por otro programa. Asi como en cualquier programa al tu interactuar con el , ingresando datos el programa te responde. Tu puedes hacer un programa que interactue con otro programa (API) y de esta manera tu programa disfrutara de los beneficios que le pueda ofrecer la AP
68
pure vs impure functions
Pure Functions: A pure function is a function that always returns the same output given the same inputs. It has no side effects, meaning it does not modify external state or variables, nor does it interact with the outside world (e.g., API calls, DOM manipulation). Pure functions are predictable and easier to reason about since they only rely on their input arguments and have no hidden dependencies. In React, pure functions are commonly used for components that are based solely on their props. Given the same props, they always render the same output.
69
useEffect when it renders?
By default, if no second argument is provided to the useEffect function, the effect will run after every render.
70
what is a const with an arrow function in react?
a const with an arrow function refers to creating a constant variable that holds an arrow function. Arrow functions are a concise way to define functions in JavaScript, and they have a more compact syntax compared to traditional function expressions. const sayHello = (name) => { return 'Hello ' + name; }
71
what is a function?
A function is a fundamental concept in programming and refers to a reusable block of code that performs a specific task or set of tasks. Functions help in organizing code into logical and manageable pieces, making it easier to read, write, and maintain.
72
inputs in fucntions are called...
arguments or parameters
73
JS is syncronims or asyncronic?
Although it's synchronous by nature, JavaScript benefits from asynchronous code.
74
Object.keys(user)
Object.keys(user) is a JavaScript method that is used to extract an array of keys from an object. In this context, it seems like user is an object, and Object.keys(user) is being used to check if the object has any properties (keys) or not.
75
single thread JS
Node.js runs JavaScript code in a single thread, which means that your code can only do one task at a time.
76
is fetching data a side effect?
fetching data from a third-party API is considered a side-effect.
77
what is AJAX? not football :)
AJAX = Asynchronous JavaScript
78
what is a reducer?
Components with many state updates spread across many event handlers can get overwhelming. For these cases, you can consolidate all the state update logic outside your component in a single function, called a reducer.
79
when to use useReducer and useState
useState, it's better to use it with primitive data types, such as strings, numbers, or booleans. The useReducer hook is best used on more complex data, specifically, arrays or objects.
80
what is a custum hook?
A custom hook is simply a way to extract a piece of functionality that you can use again and again. A custom hook is essentially a JavaScript function that starts with the word use and can call other hooks. By convention, hooks always start with the word use.
81
when to use useReducer hook
alternative to useState, but updates different the state manage its state with a reducer. inspire in redux! where the state logic is more complex and involves multiple sub-states or actions that affect each other. It can help to avoid prop drilling (passing state down through multiple layers of components) and can lead to more maintainable and predictable code. Base on an action the state will increment or decrement.
82
const [state, dispatch], what is this called? const [state, dispatch] = useReducer(reducer, initialState)
This is array destructuring in JavaScript. We are using it here to extract two values from the return value of the useReducer hook. Extraes el stata y el dispatch del hook useReducer que devuelve un array.
83
where I can find JSX?
JSX allows developers to write HTML-like code within JavaScript, making it easier to create and manipulate the UI components in React applications. JSX is used in the return statement of a React component.
84
what is used above the return in react?
JavaScript is commonly used above the return statement in a React component. The code above the return statement typically includes various JavaScript constructs,
85
what react does with components?
combines components to create a view/screen
86
what is a state?
values of variables you have on yoour components.
87
aim of npm
npm is all about code sharing and reuse. You can use other people's code in your own projects, and you can also publish your own Node.js modules so that other people can use them.
88
node.js why is needed?
React itself can be used without Node.js in the client-side browser environment, having Node.js installed can greatly facilitate the development, deployment, and overall build process when working with React projects. -js is a language that can be run in the browser, but for that needs interpretation, js enginee or babel. -you can use node js as a server side component and enables you to use javascript as a fullstack (front and back end) -a javascript runtime enviroment
89
what is react (2)?
React is just a front-end library. You're going to need to interact with other third-party libraries. client-side library. You do need to figure out how you're going to do routing and server client communication.
90
which is react design philosphy?
component based arquitecture, for reusable component code -colecction of components -example: header, payment, sidebar
91
advantages of components? (3)
reusable independent stand alone parts
92
what is the DOM and how to edit it?
It represents a web page as a tree-like structure of objects. Each object corresponds to an HTML element or content on the page. Developers can use the DOM to interact with and modify the page's content, structure, and style using JavaScript.
93
react virtual dom
tbd..
94
functional components acts like...
js function
95
index.js what is load?
the app component. Aka main component
96
index.html to be done
tbd
97
All component names must be...
capitalized, bc lowecase is seen as html elements
98
In return, variables, constants or states must be...
wrap around brackets {}
99
JSX con be defined as a combination of...
css, html and js
100
what is transpiling and what is babel?
-Babel: The React code, including JSX, is passed through Babel, a popular JavaScript transpiler. -A browser cannot understand JSX syntax. -A transpiler takes a piece of code and transforms it into some other code.
101
what is ES6?
JavaScript ES6 (also known as ECMAScript 2015 or ECMAScript 6) is the newer version of JavaScript that was introduced in 2015.
102
what is a website navegation?
refers to the process of navigating or moving through a website to find and access its various pages, content, and features. From component to component
103
examples of navegation components?
navbar with icons
104
How many divs render one react app?
entire react app is loaded inside one div and index.js. The content of that div is controlled by react.
105
Example of navegation with react elevator..
You press 6 and that floor aka component is render :)
106
What is bundling?
When the browser requests the application, return and load all necessary HTML, CSS and JavaScript immediately. This is known as bundling.
107
what is react routing library?
-is same as react-router-dom -first thing, import BROWSERROUTER -wrap your app with broserRouter, in index.js -from you app component, import routes, route -in your app return use first and then
108
what is transpiling and babel?
1. For React code to be understood by a browser, you need to have a transpiling step in which the JSX code gets converted to plain JavaScript code that a modern browser can work with. 2. Babel is a JavaScript Compiler. What Babel does is this: it allows you to transpile JSX code (which cannot be understood by a browser) into plain JavaScript code (which can be understood by a browser).
109
what is the index.html file?
the index.html file plays a critical role as it serves as the entry point of the React application
110
8 points of index.html file.
: This declaration specifies that the document is an HTML5 document. : The element is the root element of the HTML page. The lang attribute indicates the language of the document, which is set to "en" for English. : The element contains meta-information about the HTML document, such as the character encoding and viewport settings. : This meta tag specifies the character encoding for the document, typically set to UTF-8 to support a wide range of characters. : The viewport meta tag sets the initial width and scale of the web page, ensuring proper responsiveness on different devices. React App: The element sets the title of the web page, which appears in the browser's title bar or tab. <body>: The <body> element contains the visible content of the web page. <div id="root"></div>: This <div> with the id attribute "root" is where the React application is mounted and rendered. React uses this element as a target to inject its components and manage the application's UI. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":111,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":446834757},"returnTo":"/packs/21444640/subscribe"}' id='card-446834757'> <div class='header'> 111 </div> <div class='card-face question'> <div class='question-content'> conection of babel, webpack and index.html </div> </div> <div class='card-face answer'> <div class='answer-content'> You write a React component: const App = () => <div>Hello World</div>;. Babel takes this JSX and transpiles it into JavaScript that browsers can understand. Webpack bundles this transpiled code (along with any other modules and assets) into bundle.js. When users visit your website and load the index.html, the browser fetches and executes bundle.js. The executed code mounts the React app inside the <div id="root"></div> in index.html. El index.js (u otro archivo de entrada que hayas definido) es el punto de partida de tu aplicación. Es donde empiezas a escribir tu código y desde donde importas otros módulos o archivos. Cuando usas una herramienta como Webpack, toma ese archivo de entrada (index.js), sigue todas las importaciones para incluir todos los módulos necesarios, y luego los "empaqueta" todos juntos en un solo archivo, que generalmente se denomina bundle.js. ---------- Start building with index.js. Use Babel to make sure all the pieces fit. Pack everything with Webpack into a bundle.js. Place and showcase it in index.html. When a user opens the index.html, the bundled code from bundle.js executes, bringing your application to life. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":112,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":446834816},"returnTo":"/packs/21444640/subscribe"}' id='card-446834816'> <div class='header'> 112 </div> <div class='card-face question'> <div class='question-content'> what about the index.js file? </div> </div> <div class='card-face answer'> <div class='answer-content'> the index.html file provides the basic structure and a target container (<div id="root"></div>) for React to render the application, while the index.js file is responsible for importing the necessary components, rendering the main component (<App />), and initiating the React rendering process within the designated container in the index.html file. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":113,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":446834928},"returnTo":"/packs/21444640/subscribe"}' id='card-446834928'> <div class='header'> 113 </div> <div class='card-face question'> <div class='question-content'> what are modules in js? </div> </div> <div class='card-face answer'> <div class='answer-content'> units of code that can be reuse. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":114,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":446835060},"returnTo":"/packs/21444640/subscribe"}' id='card-446835060'> <div class='header'> 114 </div> <div class='card-face question'> <div class='question-content'> what is modular programming? </div> </div> <div class='card-face answer'> <div class='answer-content'> when you split you code into modules, that are similar but no exaclty the same as components. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":115,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":446900482},"returnTo":"/packs/21444640/subscribe"}' id='card-446900482'> <div class='header'> 115 </div> <div class='card-face question'> <div class='question-content'> one direction data flow </div> </div> <div class='card-face answer'> <div class='answer-content'> props pass from father to childs, no other way around. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":116,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":446901258},"returnTo":"/packs/21444640/subscribe"}' id='card-446901258'> <div class='header'> 116 </div> <div class='card-face question'> <div class='question-content'> curle brackets lets you escape... </div> </div> <div class='card-face answer'> <div class='answer-content'> jsx and get into js. So with {} you can access all your js </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":117,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":446901544},"returnTo":"/packs/21444640/subscribe"}' id='card-446901544'> <div class='header'> 117 </div> <div class='card-face question'> <div class='question-content'> () is needed in the return when, </div> </div> <div class='card-face answer'> <div class='answer-content'> you only return more than one line in html. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":118,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":446901575},"returnTo":"/packs/21444640/subscribe"}' id='card-446901575'> <div class='header'> 118 </div> <div class='card-face question'> <div class='question-content'> html code in the return must be wrapped around </div> </div> <div class='card-face answer'> <div class='answer-content'> a top level tag as div or an empty fragment <> </> </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":119,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447168426},"returnTo":"/packs/21444640/subscribe"}' id='card-447168426'> <div class='header'> 119 </div> <div class='card-face question'> <div class='question-content'> what npm does? </div> </div> <div class='card-face answer'> <div class='answer-content'> has a database of modules realted to node js. -Node Package Manager, is an essential tool for many JavaScript and Node.js developers </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":120,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447168576},"returnTo":"/packs/21444640/subscribe"}' id='card-447168576'> <div class='header'> 120 </div> <div class='card-face question'> <div class='question-content'> what is runtime enviroment? Ex node js. </div> </div> <div class='card-face answer'> <div class='answer-content'> Example: Node.js Node.js is a runtime environment for JavaScript. JavaScript Code: Think of this as a music sheet. Node.js: Think of this as the musician who can read the music sheet and play the music. Before Node.js, JavaScript could mainly be played in browsers (like Chrome, Firefox). But with Node.js, you can now play (or run) JavaScript outside of the browser, such as on a server or in your computer's terminal. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":121,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447169337},"returnTo":"/packs/21444640/subscribe"}' id='card-447169337'> <div class='header'> 121 </div> <div class='card-face question'> <div class='question-content'> what is a children? </div> </div> <div class='card-face answer'> <div class='answer-content'> is a shortcut for props.children and means you dont know which children you are expecting to come, so is like a generic prop. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":122,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447170445},"returnTo":"/packs/21444640/subscribe"}' id='card-447170445'> <div class='header'> 122 </div> <div class='card-face question'> <div class='question-content'> how to style react? </div> </div> <div class='card-face answer'> <div class='answer-content'> add a className, and code it on a style.css sheet normally. Do it inline style= {{color: red, backgroundColor: blue}}, with an object!, </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":123,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447170882},"returnTo":"/packs/21444640/subscribe"}' id='card-447170882'> <div class='header'> 123 </div> <div class='card-face question'> <div class='question-content'> inline style in react (2) </div> </div> <div class='card-face answer'> <div class='answer-content'> is an OBJECT each style is divided with COMA, inside the object and HIFFEN replace by camelCase, reference must be a "string" bc we are working on an object </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":124,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447171515},"returnTo":"/packs/21444640/subscribe"}' id='card-447171515'> <div class='header'> 124 </div> <div class='card-face question'> <div class='question-content'> Ways of declaring a react component </div> </div> <div class='card-face answer'> <div class='answer-content'> -function Name (props){} -const Name =function (props) {} const Name = (props) => {} with arrow aka annonymous function </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":125,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447172326},"returnTo":"/packs/21444640/subscribe"}' id='card-447172326'> <div class='header'> 125 </div> <div class='card-face question'> <div class='question-content'> ternary operator, what it is? </div> </div> <div class='card-face answer'> <div class='answer-content'> username === "Gabby" ? console.log("Hello, Gabby!") : console.log("Hello, Frien") condition ? true : false </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":126,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447172825},"returnTo":"/packs/21444640/subscribe"}' id='card-447172825'> <div class='header'> 126 </div> <div class='card-face question'> <div class='question-content'> when to use $ in js and react? </div> </div> <div class='card-face answer'> <div class='answer-content'> let name = 'John'; console.log(`Hello, ${name}!`); // Output: "Hello, John!" In this case, ${name} is replaced by the value of the name variable. This is not actually $ being used as a variable, but rather it is part of the ${...} syntax for embedding expressions within template literals. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":127,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447172869},"returnTo":"/packs/21444640/subscribe"}' id='card-447172869'> <div class='header'> 127 </div> <div class='card-face question'> <div class='question-content'> can I call a function inside the return? How? </div> </div> <div class='card-face answer'> <div class='answer-content'> Yes, you can. For so, you must escapte jsx, with {} </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":128,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447174630},"returnTo":"/packs/21444640/subscribe"}' id='card-447174630'> <div class='header'> 128 </div> <div class='card-face question'> <div class='question-content'> working with props. What is object descontructing? </div> </div> <div class='card-face answer'> <div class='answer-content'> props come altogther as objects. When you pass props to a component, they are received as an object, and each prop is a property on that object. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":129,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447178940},"returnTo":"/packs/21444640/subscribe"}' id='card-447178940'> <div class='header'> 129 </div> <div class='card-face question'> <div class='question-content'> is react declarative? </div> </div> <div class='card-face answer'> <div class='answer-content'> React is considered a declarative framework In other words, in declarative programming, you simply declare the desired results, and you don't have to describe step-by-step how to get the results. The system figures out the mechanics of how to arrive at the result. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":130,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447178954},"returnTo":"/packs/21444640/subscribe"}' id='card-447178954'> <div class='header'> 130 </div> <div class='card-face question'> <div class='question-content'> what is react? </div> </div> <div class='card-face answer'> <div class='answer-content'> open-source JavaScript library for building user interfaces, - particularly single-page applications. It's maintained by Facebook </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":131,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447179079},"returnTo":"/packs/21444640/subscribe"}' id='card-447179079'> <div class='header'> 131 </div> <div class='card-face question'> <div class='question-content'> what is a JSON? </div> </div> <div class='card-face answer'> <div class='answer-content'> -JavaScript Object Notation -{ "name": "John Doe", "age": 30, "isStudent": false, "courses": ["math", "english", "computer science"], "address": { "street": "123 Main St", "city": "Springfield", "postalCode": "12345" } } </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":132,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447251394},"returnTo":"/packs/21444640/subscribe"}' id='card-447251394'> <div class='header'> 132 </div> <div class='card-face question'> <div class='question-content'> what are events? </div> </div> <div class='card-face answer'> <div class='answer-content'> that events are the process by which JavaScript interacts with HTML and can occur when the user or the browser manipulates a page. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":133,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447254655},"returnTo":"/packs/21444640/subscribe"}' id='card-447254655'> <div class='header'> 133 </div> <div class='card-face question'> <div class='question-content'> 3 ways to invoke an onEvent in react </div> </div> <div class='card-face answer'> <div class='answer-content'> function handleClick(){ console.log("Hello, I'm a function outside of the click event!") } return ( <div> <button onClick={function(){ console.log("Hello, anonymous function!")}}> Hello, anonymous function! </button> <button onClick={() => { console.log("Hello, arrow function!")}}> Hello, arrow function! </button> <button onClick={handleClick}> Hello, outside function! </button> 1. outside 2. arrow function 3. as function </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":134,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447323608},"returnTo":"/packs/21444640/subscribe"}' id='card-447323608'> <div class='header'> 134 </div> <div class='card-face question'> <div class='question-content'> using arrow function onClick </div> </div> <div class='card-face answer'> <div class='answer-content'> Preventing the function from running immediately: If you write onClick={myFunction()}, myFunction will be executed as soon as the component mounts, not when the button is clicked. To delay the function execution until the click event occurs, you need to wrap the function call inside an arrow function: onClick={() => myFunction()}. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":135,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447323688},"returnTo":"/packs/21444640/subscribe"}' id='card-447323688'> <div class='header'> 135 </div> <div class='card-face question'> <div class='question-content'> difference between onClick={function} and onClick={function()} </div> </div> <div class='card-face answer'> <div class='answer-content'> If you had written onClick={handleClick()}, then the handleClick function would be invoked immediately upon mounting, which is not typically the desired behavior for event handlers. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":136,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447324690},"returnTo":"/packs/21444640/subscribe"}' id='card-447324690'> <div class='header'> 136 </div> <div class='card-face question'> <div class='question-content'> data in react is .......... and its day when is pass from parent-child-grandchild-.... is called ... </div> </div> <div class='card-face answer'> <div class='answer-content'> . unidirectional .levels of nesting </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":137,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447324731},"returnTo":"/packs/21444640/subscribe"}' id='card-447324731'> <div class='header'> 137 </div> <div class='card-face question'> <div class='question-content'> the parents is also know as the .... </div> </div> <div class='card-face answer'> <div class='answer-content'> root component </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":138,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447324957},"returnTo":"/packs/21444640/subscribe"}' id='card-447324957'> <div class='header'> 138 </div> <div class='card-face question'> <div class='question-content'> two main ways to work with data in react </div> </div> <div class='card-face answer'> <div class='answer-content'> props that are recived and do not mutate unless parent does, and states, that mutate, from component itself </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":139,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447326131},"returnTo":"/packs/21444640/subscribe"}' id='card-447326131'> <div class='header'> 139 </div> <div class='card-face question'> <div class='question-content'> explain what is a statefull and stateless component and their purpose or change if you have or not one </div> </div> <div class='card-face answer'> <div class='answer-content'> .... </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":140,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447327391},"returnTo":"/packs/21444640/subscribe"}' id='card-447327391'> <div class='header'> 140 </div> <div class='card-face question'> <div class='question-content'> why prop drilling is bad? how could it be solved? </div> </div> <div class='card-face answer'> <div class='answer-content'> "Prop drilling" refers to the process where you pass data from one part of the React component tree to another by going through other parts that do not need the data, but merely pass it along. Can be easily solved using import React, { createContext, useContext } from 'react';. aka react context API </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":141,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447332277},"returnTo":"/packs/21444640/subscribe"}' id='card-447332277'> <div class='header'> 141 </div> <div class='card-face question'> <div class='question-content'> what is a context consumer? react context API </div> </div> <div class='card-face answer'> <div class='answer-content'> Any component that uses the state provided by context API </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":142,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447334944},"returnTo":"/packs/21444640/subscribe"}' id='card-447334944'> <div class='header'> 142 </div> <div class='card-face question'> <div class='question-content'> what is JSON used for? </div> </div> <div class='card-face answer'> <div class='answer-content'> transmitting data between a web server and client. -standard format for data exchange -Ej. validating username </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":143,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447420580},"returnTo":"/packs/21444640/subscribe"}' id='card-447420580'> <div class='header'> 143 </div> <div class='card-face question'> <div class='question-content'> which data can be passed on props? 3 </div> </div> <div class='card-face answer'> <div class='answer-content'> states values functions </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":144,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447485519},"returnTo":"/packs/21444640/subscribe"}' id='card-447485519'> <div class='header'> 144 </div> <div class='card-face question'> <div class='question-content'> how navegation works in react? which library aka dependency is needed? </div> </div> <div class='card-face answer'> <div class='answer-content'> as a single page app, reacts renders in the same page, the single route. -it needs react router library </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":145,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447485668},"returnTo":"/packs/21444640/subscribe"}' id='card-447485668'> <div class='header'> 145 </div> <div class='card-face question'> <div class='question-content'> does an ancher tag with a link works in react for navegation? </div> </div> <div class='card-face answer'> <div class='answer-content'> no, it dosent. Those are "broken links". </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":146,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447485784},"returnTo":"/packs/21444640/subscribe"}' id='card-447485784'> <div class='header'> 146 </div> <div class='card-face question'> <div class='question-content'> steps to install navegation in react (4) </div> </div> <div class='card-face answer'> <div class='answer-content'> 1. insert browserRouter warpiing the app 2. inser individual route 3. wrap all the route with routes tag 4. To link a btn or menu to route, use the Link component </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":147,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447486989},"returnTo":"/packs/21444640/subscribe"}' id='card-447486989'> <div class='header'> 147 </div> <div class='card-face question'> <div class='question-content'> what are asserts? </div> </div> <div class='card-face answer'> <div class='answer-content'> any file needed by your app, could be images, stylesheets, fonts </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":148,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447487067},"returnTo":"/packs/21444640/subscribe"}' id='card-447487067'> <div class='header'> 148 </div> <div class='card-face question'> <div class='question-content'> if your component dosent need an asset, where should I store it? </div> </div> <div class='card-face answer'> <div class='answer-content'> in public folder, same as favicon does. Otherwise creta an assert folder for those needed for your component must load. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":149,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447487250},"returnTo":"/packs/21444640/subscribe"}' id='card-447487250'> <div class='header'> 149 </div> <div class='card-face question'> <div class='question-content'> what is a dependency graph? </div> </div> <div class='card-face answer'> <div class='answer-content'> a dependency graph is a conceptual representation of the relationships between different modules in your application. It essentially shows which modules depend on others. Related to bundle and webpack </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":150,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447487266},"returnTo":"/packs/21444640/subscribe"}' id='card-447487266'> <div class='header'> 150 </div> <div class='card-face question'> <div class='question-content'> what webpack does? </div> </div> <div class='card-face answer'> <div class='answer-content'> The bundler (like Webpack or Parcel) starts at the entry point of your application (usually an index.js or main.js file), and follows all the import statements to build a complete picture of how your modules depend on each other. This picture is the dependency graph. -So, webpack builds a dependency graph and bundles modules into one or more files that a browser can consume. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":151,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447487315},"returnTo":"/packs/21444640/subscribe"}' id='card-447487315'> <div class='header'> 151 </div> <div class='card-face question'> <div class='question-content'> client-side rendering and server-side rendering, tbd </div> </div> <div class='card-face answer'> <div class='answer-content'> </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":152,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447488973},"returnTo":"/packs/21444640/subscribe"}' id='card-447488973'> <div class='header'> 152 </div> <div class='card-face question'> <div class='question-content'> how to embed videos? </div> </div> <div class='card-face answer'> <div class='answer-content'> -react-player check npm packeages, check updates frequencies github page </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":153,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447490920},"returnTo":"/packs/21444640/subscribe"}' id='card-447490920'> <div class='header'> 153 </div> <div class='card-face question'> <div class='question-content'> why we need jest + RTL in the testing ecosystem? </div> </div> <div class='card-face answer'> <div class='answer-content'> Jest is a testing framework that provides the overall test running infrastructure. It provides functionalities such as organizing your tests into suites and test cases React Testing Library (RTL) is a library for testing React components in a way that resembles how users would interact with your application. RTL doesn't provide a test running infrastructure, it is just a tool for writing effective tests for React components. -You could think of Jest as the engine that powers your tests, while React Testing Library is a toolkit for writing specific kinds of tests (React component tests, in this case). </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":154,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447641850},"returnTo":"/packs/21444640/subscribe"}' id='card-447641850'> <div class='header'> 154 </div> <div class='card-face question'> <div class='question-content'> what is an element? </div> </div> <div class='card-face answer'> <div class='answer-content'> element is a plain object that describes a component instance or a DOM node and its desired properties. It's a light, stateless, and immutable description of what you want to see on the screen. An element is what React uses to construct and update the DOM or the native components if you are using React Native. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":155,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447641861},"returnTo":"/packs/21444640/subscribe"}' id='card-447641861'> <div class='header'> 155 </div> <div class='card-face question'> <div class='question-content'> React children as props. What is specialization? </div> </div> <div class='card-face answer'> <div class='answer-content'> Specialization defines components as being “special cases” of other components. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":156,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447641873},"returnTo":"/packs/21444640/subscribe"}' id='card-447641873'> <div class='header'> 156 </div> <div class='card-face question'> <div class='question-content'> React children as props. What is Containment? </div> </div> <div class='card-face answer'> <div class='answer-content'> Containment refers to the fact that some components don’t know their children ahead of time. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":157,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447641983},"returnTo":"/packs/21444640/subscribe"}' id='card-447641983'> <div class='header'> 157 </div> <div class='card-face question'> <div class='question-content'> component composition technique with children </div> </div> <div class='card-face answer'> <div class='answer-content'> </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":158,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447643162},"returnTo":"/packs/21444640/subscribe"}' id='card-447643162'> <div class='header'> 158 </div> <div class='card-face question'> <div class='question-content'> testing ad </div> </div> <div class='card-face answer'> <div class='answer-content'> -finding bugs -save money and time </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":159,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447643209},"returnTo":"/packs/21444640/subscribe"}' id='card-447643209'> <div class='header'> 159 </div> <div class='card-face question'> <div class='question-content'> what the test interacts with? </div> </div> <div class='card-face answer'> <div class='answer-content'> react dom </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":160,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447643260},"returnTo":"/packs/21444640/subscribe"}' id='card-447643260'> <div class='header'> 160 </div> <div class='card-face question'> <div class='question-content'> jest </div> </div> <div class='card-face answer'> <div class='answer-content'> js test runner gives access to jsdom </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":161,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447721960},"returnTo":"/packs/21444640/subscribe"}' id='card-447721960'> <div class='header'> 161 </div> <div class='card-face question'> <div class='question-content'> why do we need to finish with test.js a test file? </div> </div> <div class='card-face answer'> <div class='answer-content'> so Jest when it runs the test knows and find it </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":162,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447723009},"returnTo":"/packs/21444640/subscribe"}' id='card-447723009'> <div class='header'> 162 </div> <div class='card-face question'> <div class='question-content'> Continuous Integration (CI) </div> </div> <div class='card-face answer'> <div class='answer-content'> is a software development technique in which developers use a version control system, like Git, and push code changes daily, multiple times a day. Instead of building out features in isolation and integrating them at the end of the development cycle, a more iterative approach is employed. -Each merge triggers an automated set of scripts to automatically build and test your application. These scripts help decrease the chances that you introduce errors in your application. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":163,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447723090},"returnTo":"/packs/21444640/subscribe"}' id='card-447723090'> <div class='header'> 163 </div> <div class='card-face question'> <div class='question-content'> CI Pipeline </div> </div> <div class='card-face answer'> <div class='answer-content'> When new code enters one end, a new version of the app gets built automatically, and a suite of automated tests is run against it. -A developer from the team creates a new branch of code in Github, performs changes in the code, and commits them. When the developer pushes its work to GitHub, the CI system builds the code on its servers and runs the automated test suite. Suppose the CI system detects any error in the CI pipeline. In that case, the developer who pushed the code gets a notification. if the status is green and all goes well, the pipeline moves to its next stage, which usually involves deploying a new version of the application to a staging server. This new version can be used internally by the Quality Assurance (QA) team to verify the changes in a production-like environment. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":164,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447723350},"returnTo":"/packs/21444640/subscribe"}' id='card-447723350'> <div class='header'> 164 </div> <div class='card-face question'> <div class='question-content'> what are styles guide while developing? </div> </div> <div class='card-face answer'> <div class='answer-content'> improves usability, readiabiilty, mainteince. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":165,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447725101},"returnTo":"/packs/21444640/subscribe"}' id='card-447725101'> <div class='header'> 165 </div> <div class='card-face question'> <div class='question-content'> what is a compoennt? </div> </div> <div class='card-face answer'> <div class='answer-content'> function that takes data or props as input and return a tree of elemetnts as output. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":166,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447725152},"returnTo":"/packs/21444640/subscribe"}' id='card-447725152'> <div class='header'> 166 </div> <div class='card-face question'> <div class='question-content'> what are elements? </div> </div> <div class='card-face answer'> <div class='answer-content'> plan js objects, that make a representation of the dom and let react update the user interface fast. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":167,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447727843},"returnTo":"/packs/21444640/subscribe"}' id='card-447727843'> <div class='header'> 167 </div> <div class='card-face question'> <div class='question-content'> what is a tree of elements? </div> </div> <div class='card-face answer'> <div class='answer-content'> the main react object where app gets renders and all the subsequents components aka the childs, generating a tree of objects. All this are js objects </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":168,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447728006},"returnTo":"/packs/21444640/subscribe"}' id='card-447728006'> <div class='header'> 168 </div> <div class='card-face question'> <div class='question-content'> virtual and real dom explanation </div> </div> <div class='card-face answer'> <div class='answer-content'> reacts creates this objects and a tree of objects in js. That tree is in memory of react, aka the virtual dom. So virtual and real dom needs to be sync. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":169,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447728056},"returnTo":"/packs/21444640/subscribe"}' id='card-447728056'> <div class='header'> 169 </div> <div class='card-face question'> <div class='question-content'> how to update old real tree with small changes detected when comparing with virual dom. How to compare and update? </div> </div> <div class='card-face answer'> <div class='answer-content'> with diffing alforithm. Diffing aka differenciting the tree! We dont want to re render the whole tree! Its huge and expensive! </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":170,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447728924},"returnTo":"/packs/21444640/subscribe"}' id='card-447728924'> <div class='header'> 170 </div> <div class='card-face question'> <div class='question-content'> React.cloneElement </div> </div> <div class='card-face answer'> <div class='answer-content'> allows you to create a copy of a specific element while preserving its props and children. This cloned element can then be given new props to extend or override the props of the original element. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":171,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447729044},"returnTo":"/packs/21444640/subscribe"}' id='card-447729044'> <div class='header'> 171 </div> <div class='card-face question'> <div class='question-content'> React.children.map </div> </div> <div class='card-face answer'> <div class='answer-content'> iterate over the children of a component and perform an operation on each individual child. It is very similar to the JavaScript Array.map function, but React.Children.map takes into account that props.children may be an array or a single item. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":172,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447729506},"returnTo":"/packs/21444640/subscribe"}' id='card-447729506'> <div class='header'> 172 </div> <div class='card-face question'> <div class='question-content'> spread operator ... </div> </div> <div class='card-face answer'> <div class='answer-content'> make it simplier :) </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":173,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447733612},"returnTo":"/packs/21444640/subscribe"}' id='card-447733612'> <div class='header'> 173 </div> <div class='card-face question'> <div class='question-content'> Cross-cutting </div> </div> <div class='card-face answer'> <div class='answer-content'> </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":174,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447733625},"returnTo":"/packs/21444640/subscribe"}' id='card-447733625'> <div class='header'> 174 </div> <div class='card-face question'> <div class='question-content'> Higher Order Component </div> </div> <div class='card-face answer'> <div class='answer-content'> - HOCs are a way to reuse component logic. Specifically, a HOC is a function that takes a component and returns a new component. -A HOC transforms a component into another component. In other words, it enhances or extends the capabilities of the component provided. -withLogging is a HOC </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":175,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447801226},"returnTo":"/packs/21444640/subscribe"}' id='card-447801226'> <div class='header'> 175 </div> <div class='card-face question'> <div class='question-content'> How to map over an array comming by props... <ul> {props.name.map((--------------------) => ( ----------------------- ))} </ul> </div> </div> <div class='card-face answer'> <div class='answer-content'> <ul> {props.name.map((eachm, index) => ( <li>{eachm}</li> ))} </ul> </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":176,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447881276},"returnTo":"/packs/21444640/subscribe"}' id='card-447881276'> <div class='header'> 176 </div> <div class='card-face question'> <div class='question-content'> what the with part of a HOC represents? 2 examples </div> </div> <div class='card-face answer'> <div class='answer-content'> The with part of the HOC name is a general convention recommended by React, as it expresses the enhancing nature of the technique, like providing a component ‘with’ something else. -login -subcription </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":177,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":447881496},"returnTo":"/packs/21444640/subscribe"}' id='card-447881496'> <div class='header'> 177 </div> <div class='card-face question'> <div class='question-content'> render props and HOC, what are thoughts about it? </div> </div> <div class='card-face answer'> <div class='answer-content'> Since the introduction of hooks in React, the need for render props (and higher-order components) has greatly decreased. A lot of the patterns where we formerly used these techniques can now be done more straightforwardly with hooks. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":178,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":448026832},"returnTo":"/packs/21444640/subscribe"}' id='card-448026832'> <div class='header'> 178 </div> <div class='card-face question'> <div class='question-content'> what are axios and fetch? 1 =, 2 dif </div> </div> <div class='card-face answer'> <div class='answer-content'> -both ways to make HTTP requests in JavaScript -hey have different APIs and different features. -Parsing JSON: Axios automatically transforms JSON data into JavaScript objects. With Fetch, you need to call the .json() method on the Response object to transform the data into a JavaScript object. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":179,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":448026890},"returnTo":"/packs/21444640/subscribe"}' id='card-448026890'> <div class='header'> 179 </div> <div class='card-face question'> <div class='question-content'> axios basic structure 1. axios.------() .----------------------- .------------------------- .------------------------- </div> </div> <div class='card-face answer'> <div class='answer-content'> axios.get('https://api.example.com/data') .then(response => { console.log(response.data); }) .catch(error => { console.error('Error fetching data: ', error); }) .finally(() => { console.log('Finished fetching data'); }); </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":180,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":448026913},"returnTo":"/packs/21444640/subscribe"}' id='card-448026913'> <div class='header'> 180 </div> <div class='card-face question'> <div class='question-content'> what is finally used for in fetch or axios? </div> </div> <div class='card-face answer'> <div class='answer-content'> .finally() method to specify what should happen when the Promise has finished, whether it was fulfilled or rejected. In this case, we are logging a message to the console. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":181,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":448027023},"returnTo":"/packs/21444640/subscribe"}' id='card-448027023'> <div class='header'> 181 </div> <div class='card-face question'> <div class='question-content'> what is jQuery? main function it has </div> </div> <div class='card-face answer'> <div class='answer-content'> - jQuery is a JavaScript library -the $ function is a central part of jQuery. It can select HTML elements, create HTML elements, handle events, and perform other useful tasks. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":182,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":448027254},"returnTo":"/packs/21444640/subscribe"}' id='card-448027254'> <div class='header'> 182 </div> <div class='card-face question'> <div class='question-content'> what is oracle db and connection with sql developer? </div> </div> <div class='card-face answer'> <div class='answer-content'> -It's one of the world's leading relational database management systems (RDBMS). The database software allows you to store, manage data. - With Oracle SQL Developer, you can connect to an Oracle Database instance. You can connect using the network alias of the Oracle database, or you can use the hostname, port number, and SID/service name to connect. Once connected, you can create, modify, and delete database objects such as tables, views, indexes, sequences, procedures, functions, and packages </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":183,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":448027694},"returnTo":"/packs/21444640/subscribe"}' id='card-448027694'> <div class='header'> 183 </div> <div class='card-face question'> <div class='question-content'> what is typescript? basic answer </div> </div> <div class='card-face answer'> <div class='answer-content'> -is a programming language that works on top of js and help you detect errors before going and running your app. In the develop stage </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":184,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":448030488},"returnTo":"/packs/21444640/subscribe"}' id='card-448030488'> <div class='header'> 184 </div> <div class='card-face question'> <div class='question-content'> Math.floor(Math.random() * 5), explain what is doing? remeber your phrases making... </div> </div> <div class='card-face answer'> <div class='answer-content'> 1. math ramdom choose a random number within 5, 2. as that number could have decimals and I need a integer 3. math.floor, lo redondea. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":185,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":449683556},"returnTo":"/packs/21444640/subscribe"}' id='card-449683556'> <div class='header'> 185 </div> <div class='card-face question'> <div class='question-content'> what is ag grid? </div> </div> <div class='card-face answer'> <div class='answer-content'> datagrid library for js It's a component used for displaying tabular data in a series of rows and columns. for data grid </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":186,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":449683594},"returnTo":"/packs/21444640/subscribe"}' id='card-449683594'> <div class='header'> 186 </div> <div class='card-face question'> <div class='question-content'> how is basic ag grid with --- and ---? how is the component gonna be render? </div> </div> <div class='card-face answer'> <div class='answer-content'> <AgGridReact columnDefs={columns} rowData={rowData} /> </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":187,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":449683907},"returnTo":"/packs/21444640/subscribe"}' id='card-449683907'> <div class='header'> 187 </div> <div class='card-face question'> <div class='question-content'> what are grid options in ag grid? </div> </div> <div class='card-face answer'> <div class='answer-content'> Grid Options: properties and callbacks used to configure the grid, e.g. pagination = true and getRowHeight(params). Pagination Options: pagination: Set to true to enable pagination. paginationPageSize: Number of rows per page. domLayout: Set to 'autoHeight' for the grid to adjust its height based on rows inside it. Sorting and Filtering: enableSorting: Allow column sorting. enableFilter: Allow column filtering. defaultColDef: A default column definition. All its properties will be applied to every column. Styling: rowClass: Add custom class(es) to rows. rowStyle: Dynamic styles based on row data. Events: onRowClicked: Event fired when a row is clicked. onCellEditingStarted: Event fired when cell editing starts. onCellEditingStopped: Event fired when cell editing stops. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":188,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":449684053},"returnTo":"/packs/21444640/subscribe"}' id='card-449684053'> <div class='header'> 188 </div> <div class='card-face question'> <div class='question-content'> react query </div> </div> <div class='card-face answer'> <div class='answer-content'> is a library that gives React JS the state management ability for any kind of asynchronous data.} useQuery is a custom hook </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":189,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":449685272},"returnTo":"/packs/21444640/subscribe"}' id='card-449685272'> <div class='header'> 189 </div> <div class='card-face question'> <div class='question-content'> A useQuery hook requires two arguments., which are... </div> </div> <div class='card-face answer'> <div class='answer-content'> The first one is a key for the query. I’m using the string “users” for that. The second one is a function to fetch the data. I put the fetchUsers asynchronous function I created earlier. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":190,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":449685375},"returnTo":"/packs/21444640/subscribe"}' id='card-449685375'> <div class='header'> 190 </div> <div class='card-face question'> <div class='question-content'> what is return in an useQuery hook? </div> </div> <div class='card-face answer'> <div class='answer-content'> Data is the actual data we fetched, and status will either be loading, error, success or idle, according to the response. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":191,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":449685496},"returnTo":"/packs/21444640/subscribe"}' id='card-449685496'> <div class='header'> 191 </div> <div class='card-face question'> <div class='question-content'> name 5 properties in the return of a useQuery: </div> </div> <div class='card-face answer'> <div class='answer-content'> data, error, failureCount, isError, isFetchedAfterMount, isFetching, isIdle, isLoading, isPreviousData, isStale, isSuccess, refetch, remove, status, </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":192,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":449685688},"returnTo":"/packs/21444640/subscribe"}' id='card-449685688'> <div class='header'> 192 </div> <div class='card-face question'> <div class='question-content'> what happens when you type an url into a brownser and you hit enter? </div> </div> <div class='card-face answer'> <div class='answer-content'> you type a URL into a browser and hit enter, the following simplified steps occur: DNS Lookup: The browser first checks if it already knows the IP address associated with the domain. If not, it queries a Domain Name System (DNS) server to translate the URL's domain name (like www.example.com) into an IP address. Browser Request: The browser sends a request to the web server at the identified IP address, asking for the content associated with the URL. Server Processing: Depending on the website, the server might need to run some scripts (like querying a database) to prepare the content that needs to be sent back. Data Transmission: The server sends the requested data back to the browser, usually in the form of HTML, CSS, JavaScript, and possibly media (images, videos, etc.). Browser Rendering: The browser processes the received data and displays the webpage on your screen. This includes interpreting the HTML, CSS, and JavaScript to generate the visible content and any interactive elements. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":193,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":449685813},"returnTo":"/packs/21444640/subscribe"}' id='card-449685813'> <div class='header'> 193 </div> <div class='card-face question'> <div class='question-content'> what is an outer function? </div> </div> <div class='card-face answer'> <div class='answer-content'> function outerFunction() { let outerVariable = "I'm from the outer function!"; function innerFunction() { console.log(outerVariable); // This inner function has access to the outerVariable } return innerFunction; } . In this context, "outer function" simply refers to the function that wraps or encloses the inner function. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":194,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":449685931},"returnTo":"/packs/21444640/subscribe"}' id='card-449685931'> <div class='header'> 194 </div> <div class='card-face question'> <div class='question-content'> what is closures in js? </div> </div> <div class='card-face answer'> <div class='answer-content'> The inner function has access to variables from its enclosing scope (i.e., outerVariable). This capability demonstrates the concept of closures in JavaScript. function outerFunction() { let outerVariable = "I'm from the outer function!"; function innerFunction() { console.log(outerVariable); // This inner function has access to the outerVariable } return innerFunction; } . </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":195,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":449686120},"returnTo":"/packs/21444640/subscribe"}' id='card-449686120'> <div class='header'> 195 </div> <div class='card-face question'> <div class='question-content'> difference between map and foreach in js </div> </div> <div class='card-face answer'> <div class='answer-content'> are methods available on arrays in JavaScript, and they both iterate over the items in the array. -map: Transforms each element of the array and returns a new array with the transformed elements. The original array remains unchanged. forEach: Executes a given function on each element of the array for side effects. It does not return a meaningful value (it returns undefined). </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":196,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":449799744},"returnTo":"/packs/21444640/subscribe"}' id='card-449799744'> <div class='header'> 196 </div> <div class='card-face question'> <div class='question-content'> como se le dice a un array? en spanish sil vou ple </div> </div> <div class='card-face answer'> <div class='answer-content'> lista </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":197,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":449799745},"returnTo":"/packs/21444640/subscribe"}' id='card-449799745'> <div class='header'> 197 </div> <div class='card-face question'> <div class='question-content'> columnDef is an array? </div> </div> <div class='card-face answer'> <div class='answer-content'> columnDefs is an array of objects where each object defines the properties of a column in the grid. Each object in the columnDefs array corresponds to a column. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":198,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":450027150},"returnTo":"/packs/21444640/subscribe"}' id='card-450027150'> <div class='header'> 198 </div> <div class='card-face question'> <div class='question-content'> what is field and headerName? </div> </div> <div class='card-face answer'> <div class='answer-content'> The headerName property determines what is displayed in the column header. The field property binds the column to a specific field in the row data. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":199,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":450027183},"returnTo":"/packs/21444640/subscribe"}' id='card-450027183'> <div class='header'> 199 </div> <div class='card-face question'> <div class='question-content'> what is rowData? </div> </div> <div class='card-face answer'> <div class='answer-content'> rowData is an array. Each item in the array represents a row in the grid, and each item is typically an object where the keys correspond to column fields and the values are the data for those columns. const rowData = [ { make: "Toyota", model: "Celica", price: 35000 }, { make: "Ford", model: "Mondeo", price: 32000 }, { make: "Porsche", model: "Boxster", price: 72000 } ]; </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":200,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":450027255},"returnTo":"/packs/21444640/subscribe"}' id='card-450027255'> <div class='header'> 200 </div> <div class='card-face question'> <div class='question-content'> cellRenderer functionality in ag-Grid </div> </div> <div class='card-face answer'> <div class='answer-content'> customize how data in a cell is displayed. You can provide a function, a React component, or a string that points to a predefined renderer. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":201,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":450027627},"returnTo":"/packs/21444640/subscribe"}' id='card-450027627'> <div class='header'> 201 </div> <div class='card-face question'> <div class='question-content'> In ag-Grid, gridOptions is </div> </div> <div class='card-face answer'> <div class='answer-content'> object that provides configuration for the grid. It's essentially the "settings" of your grid, where you define various properties and event callbacks to customize the behavior and appearance of your ag-Grid instance. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":202,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":450030059},"returnTo":"/packs/21444640/subscribe"}' id='card-450030059'> <div class='header'> 202 </div> <div class='card-face question'> <div class='question-content'> gridRef = useRef() </div> </div> <div class='card-face answer'> <div class='answer-content'> you're creating a ref with React's useRef hook, which is used to access and interact with DOM elements or component instances directly within functional components. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":203,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":450030073},"returnTo":"/packs/21444640/subscribe"}' id='card-450030073'> <div class='header'> 203 </div> <div class='card-face question'> <div class='question-content'> the line let updatedData = [...rowData]; </div> </div> <div class='card-face answer'> <div class='answer-content'> is used to create a shallow copy of the rowData array. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":204,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":450030793},"returnTo":"/packs/21444640/subscribe"}' id='card-450030793'> <div class='header'> 204 </div> <div class='card-face question'> <div class='question-content'> un objecto tiene ------------ y su correspondiente ----------- </div> </div> <div class='card-face answer'> <div class='answer-content'> keys and properties. Object.keys() is particularly useful when you want to iterate over an object's properties, or when you need to determine the number of properties in an object without iterating through them. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":205,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":450055714},"returnTo":"/packs/21444640/subscribe"}' id='card-450055714'> <div class='header'> 205 </div> <div class='card-face question'> <div class='question-content'> strongly typed or statically typed. Ex of one that is and one not </div> </div> <div class='card-face answer'> <div class='answer-content'> When a programming language requires you to specify a data type for a variable (or function return type, parameter type, etc.). is c# not Python, JavaScript </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":206,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":450109812},"returnTo":"/packs/21444640/subscribe"}' id='card-450109812'> <div class='header'> 206 </div> <div class='card-face question'> <div class='question-content'> The method return type is void </div> </div> <div class='card-face answer'> <div class='answer-content'> which means it doesn't return any value. However, you're trying to return a string. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":207,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":451529609},"returnTo":"/packs/21444640/subscribe"}' id='card-451529609'> <div class='header'> 207 </div> <div class='card-face question'> <div class='question-content'> Object.keys() in js. what will return? const object = { a: 'value1', b: 'value2', c: 'value3' }; const keys = Object.keys(object); </div> </div> <div class='card-face answer'> <div class='answer-content'> console.log(keys); // ['a', 'b', 'c'] </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":208,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":451529696},"returnTo":"/packs/21444640/subscribe"}' id='card-451529696'> <div class='header'> 208 </div> <div class='card-face question'> <div class='question-content'> Object.values() in js. what will return? const object = { a: 'value1', b: 'value2', c: 'value3' }; const values = Object.values(object); </div> </div> <div class='card-face answer'> <div class='answer-content'> console.log(values); // ['value1', 'value2', 'value3'] </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":209,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":451529799},"returnTo":"/packs/21444640/subscribe"}' id='card-451529799'> <div class='header'> 209 </div> <div class='card-face question'> <div class='question-content'> If I need the keys and values from an object, what can I use? </div> </div> <div class='card-face answer'> <div class='answer-content'> const entries = Object.entries(object); console.log(entries); // [['a', 'value1'], ['b', 'value2'], ['c', 'value3']] </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":210,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":451531531},"returnTo":"/packs/21444640/subscribe"}' id='card-451531531'> <div class='header'> 210 </div> <div class='card-face question'> <div class='question-content'> How is row and columns related in ag grid? </div> </div> <div class='card-face answer'> <div class='answer-content'> By filed in column const rowData = [ {name: "John", age: 28, gender: "Male"}, {name: "Jane", age: 22, gender: "Female"}, {name: "Doe", age: 31, gender: "Non-Binary"} ]; const columnDefs = [ {headerName: "Name", field: "name"}, {headerName: "Age", field: "age"}, {headerName: "Gender", field: "gender"} ]; </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":211,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":451532831},"returnTo":"/packs/21444640/subscribe"}' id='card-451532831'> <div class='header'> 211 </div> <div class='card-face question'> <div class='question-content'> if I set an state, and I need the old data and Add new one, what you should do? </div> </div> <div class='card-face answer'> <div class='answer-content'> ...prevMessages, newMessage </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":212,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":452809018},"returnTo":"/packs/21444640/subscribe"}' id='card-452809018'> <div class='header'> 212 </div> <div class='card-face question'> <div class='question-content'> I need something to happen if I go into a then and something else if I go into a catch? Should I put that logic into a variable and then do it in the code or what? </div> </div> <div class='card-face answer'> <div class='answer-content'> No, your logic must be inside the then and the catch. Promesis are asyncronic, which means we dont know exacly when it happens, so we must put the logic inside it. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":213,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":452809262},"returnTo":"/packs/21444640/subscribe"}' id='card-452809262'> <div class='header'> 213 </div> <div class='card-face question'> <div class='question-content'> How to destructure something like function (params) params.value? </div> </div> <div class='card-face answer'> <div class='answer-content'> function({value}) </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":214,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":452809434},"returnTo":"/packs/21444640/subscribe"}' id='card-452809434'> <div class='header'> 214 </div> <div class='card-face question'> <div class='question-content'> besides params, what are arguments? </div> </div> <div class='card-face answer'> <div class='answer-content'> arguments is something else passed by the father. So the params is like one of the things is passed by, some other "params" could be being passed too. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":215,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":452929706},"returnTo":"/packs/21444640/subscribe"}' id='card-452929706'> <div class='header'> 215 </div> <div class='card-face question'> <div class='question-content'> check if something is inside a list without condicional methods. What can be used, not for objects. </div> </div> <div class='card-face answer'> <div class='answer-content'> includes. checking for simple values like strings or numbers in an array. However, for objects, two objects with the same properties and values are considered distinct unless they reference the exact same object. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":216,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":452930516},"returnTo":"/packs/21444640/subscribe"}' id='card-452930516'> <div class='header'> 216 </div> <div class='card-face question'> <div class='question-content'> check if something is inside a list without condicional methods. What can be used, FOR special case OBJECTS. </div> </div> <div class='card-face answer'> <div class='answer-content'> The some method checks if at least one item in the array meets the condition specified in a callback function. some. some stops iterating as soon as it finds a match. When you use some, you're directly checking each object in the array for a match. The some method itself doesn't compare objects. Instead, it iterates over the array and applies the callback function you provide to each element </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":217,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":452931006},"returnTo":"/packs/21444640/subscribe"}' id='card-452931006'> <div class='header'> 217 </div> <div class='card-face question'> <div class='question-content'> What Is Memoization? </div> </div> <div class='card-face answer'> <div class='answer-content'> Memoization is when a complex function stores its output so the next time it is called with the same input. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":218,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":452937226},"returnTo":"/packs/21444640/subscribe"}' id='card-452937226'> <div class='header'> 218 </div> <div class='card-face question'> <div class='question-content'> useCallback vs useMemo, when to use each one? </div> </div> <div class='card-face answer'> <div class='answer-content'> The key difference is that useMemo returns a memoized value, whereas useCallback returns a memoized function. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":219,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":452943133},"returnTo":"/packs/21444640/subscribe"}' id='card-452943133'> <div class='header'> 219 </div> <div class='card-face question'> <div class='question-content'> Explain the useEffect hooks, when it triggers, how is composed and what returns. </div> </div> <div class='card-face answer'> <div class='answer-content'> </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":220,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":452944375},"returnTo":"/packs/21444640/subscribe"}' id='card-452944375'> <div class='header'> 220 </div> <div class='card-face question'> <div class='question-content'> Explain functional components cycle and related that with useMemo and useCallback </div> </div> <div class='card-face answer'> <div class='answer-content'> </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":221,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":453031075},"returnTo":"/packs/21444640/subscribe"}' id='card-453031075'> <div class='header'> 221 </div> <div class='card-face question'> <div class='question-content'> What is an object? in js </div> </div> <div class='card-face answer'> <div class='answer-content'> a collection of properties where each property has a key and a value. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":222,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":453031213},"returnTo":"/packs/21444640/subscribe"}' id='card-453031213'> <div class='header'> 222 </div> <div class='card-face question'> <div class='question-content'> what is a call stack? how it works? </div> </div> <div class='card-face answer'> <div class='answer-content'> The call stack is used by JavaScript to keep track of multiple function calls. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":223,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":453472550},"returnTo":"/packs/21444640/subscribe"}' id='card-453472550'> <div class='header'> 223 </div> <div class='card-face question'> <div class='question-content'> can you use map over an json data structure? </div> </div> <div class='card-face answer'> <div class='answer-content'> No. Object.values(jsonObject).map(value => value.name); </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":224,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":453472817},"returnTo":"/packs/21444640/subscribe"}' id='card-453472817'> <div class='header'> 224 </div> <div class='card-face question'> <div class='question-content'> how to retun data when you are using map? do I need {}? </div> </div> <div class='card-face answer'> <div class='answer-content'> Depends. Object.values(jsonObject).map(value => value.name); this is equal but no needed bc is only one line return Object.values(jsonObject).map(value => {return value.name}); </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":225,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":453472927},"returnTo":"/packs/21444640/subscribe"}' id='card-453472927'> <div class='header'> 225 </div> <div class='card-face question'> <div class='question-content'> why I dont need the {}? Object.values(jsonObject).map(value => value.name); </div> </div> <div class='card-face answer'> <div class='answer-content'> No, you don't necessarily need to use the return keyword if you're using arrow functions with a concise body. In arrow functions, the value after the => is implicitly returned if you omit the curly braces ({}). </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":226,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":454065336},"returnTo":"/packs/21444640/subscribe"}' id='card-454065336'> <div class='header'> 226 </div> <div class='card-face question'> <div class='question-content'> How to add a property to an object? Object.values(jsonObject).map(value =>-----------); </div> </div> <div class='card-face answer'> <div class='answer-content'> Object.values(jsonObject).map(obj => { obj.newProperty = "newValue"; return obj; }); </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":227,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":454065656},"returnTo":"/packs/21444640/subscribe"}' id='card-454065656'> <div class='header'> 227 </div> <div class='card-face question'> <div class='question-content'> where should be brackers be in js {} if(){ ----------}else{ ----------}; </div> </div> <div class='card-face answer'> <div class='answer-content'> if(){ ----------}else{ ----------}; </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":228,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":454065790},"returnTo":"/packs/21444640/subscribe"}' id='card-454065790'> <div class='header'> 228 </div> <div class='card-face question'> <div class='question-content'> how to merge by terminal? </div> </div> <div class='card-face answer'> <div class='answer-content'> go to master, fetch changes. go back to your branch In terminal git merge </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":229,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":455023871},"returnTo":"/packs/21444640/subscribe"}' id='card-455023871'> <div class='header'> 229 </div> <div class='card-face question'> <div class='question-content'> undestading hooks like useMemo and useCallback with memory </div> </div> <div class='card-face answer'> <div class='answer-content'> https://www.youtube.com/watch?v=3cYtqrNUiVw&ab_channel=JustinKim </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":230,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":455023973},"returnTo":"/packs/21444640/subscribe"}' id='card-455023973'> <div class='header'> 230 </div> <div class='card-face question'> <div class='question-content'> using reduce in js </div> </div> <div class='card-face answer'> <div class='answer-content'> </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":231,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":455327030},"returnTo":"/packs/21444640/subscribe"}' id='card-455327030'> <div class='header'> 231 </div> <div class='card-face question'> <div class='question-content'> SOLID with react </div> </div> <div class='card-face answer'> <div class='answer-content'> Single Responsibility Principle (SRP): Definition: A class should have one, and only one, reason to change. In React: Each React component should have a single responsibility. That is, each component should represent one piece of a UI or handle one specific task. If you find that your component is becoming too complex, it's often a sign that it should be broken down into smaller, more focused components. Open/Closed Principle (OCP): Definition: Software entities should be open for extension but closed for modification. In React: Use component composition and Higher Order Components (HOCs) to extend the behavior of existing components without modifying their internal implementations. The idea here is to build components in such a way that new functionalities can be added without altering existing code, which can be achieved through props and composition. Liskov Substitution Principle (LSP): Definition: Subtypes must be substitutable for their base types without altering the correctness of the program. In React: While React mainly deals with components rather than traditional inheritance structures, the principle can be applied in terms of prop contracts. If a component expects a certain prop type or shape, any data or component you pass in as that prop should adhere to the same contract. PropTypes and TypeScript can be helpful tools to ensure this. Interface Segregation Principle (ISP): Definition: Clients should not be forced to depend upon interfaces they do not use. In React: It's more about the component API. Components should have props that make sense for their use and not additional props which are unrelated to their function. Essentially, do not overload a component with unnecessary props or methods. Dependency Inversion Principle (DIP): Definition: High-level modules should not depend on low-level modules. Both should depend on abstractions. In React: Dependency injection can be a bit tricky in React because React's component-driven architecture is a bit different from traditional OOP. However, React's Context API and certain state management libraries allow you to invert dependencies by providing required dependencies through context or global state, decoupling child components from their parents. https://www.youtube.com/watch?v=MSq_DCRxOxw&ab_channel=CoderOne </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":232,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":455327049},"returnTo":"/packs/21444640/subscribe"}' id='card-455327049'> <div class='header'> 232 </div> <div class='card-face question'> <div class='question-content'> hooks review </div> </div> <div class='card-face answer'> <div class='answer-content'> https://www.youtube.com/watch?v=9mTgKFjJRXg&ab_channel=developedbyed </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":233,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":455327090},"returnTo":"/packs/21444640/subscribe"}' id='card-455327090'> <div class='header'> 233 </div> <div class='card-face question'> <div class='question-content'> Que es un json? </div> </div> <div class='card-face answer'> <div class='answer-content'> JSON está constituido por dos estructuras: * Una colección de pares de nombre/valor. En varios lenguajes esto es conocido como un objeto, registro, estructura, diccionario, tabla hash, lista de claves o un arreglo asociativo. * Una lista ordenada de valores. En la mayoría de los lenguajes, esto se implementa como arreglos, vectores, listas o secuencias. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":234,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":457292356},"returnTo":"/packs/21444640/subscribe"}' id='card-457292356'> <div class='header'> 234 </div> <div class='card-face question'> <div class='question-content'> what babel does? </div> </div> <div class='card-face answer'> <div class='answer-content'> Babel: Think of Babel as a translator. Some parts of your sci-fi novel use a futuristic language (new JavaScript features or JSX) that not everyone understands. Babel translates (or transpiles) your novel into plain English (older JavaScript) so that a wider audience (all browsers) can understand and enjoy it. Babel converts newer JavaScript and JSX into older JavaScript so that it can run in any browser. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":235,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":457292545},"returnTo":"/packs/21444640/subscribe"}' id='card-457292545'> <div class='header'> 235 </div> <div class='card-face question'> <div class='question-content'> what webpack does? </div> </div> <div class='card-face answer'> <div class='answer-content'> Webpack: Now, instead of releasing your novel as one big book, you decide to split it into several smaller books (modules) – each focusing on a specific part of the story. This makes it easier for you to write and organize, but readers generally want a single book to read. Webpack is like a bookbinder that takes all these smaller books (modules) and combines them into one cohesive book (bundle) for the readers. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":236,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":457292660},"returnTo":"/packs/21444640/subscribe"}' id='card-457292660'> <div class='header'> 236 </div> <div class='card-face question'> <div class='question-content'> relationship with index.html and index.js </div> </div> <div class='card-face answer'> <div class='answer-content'> index.html: Think of this as the theater stage. It's an empty platform waiting for a performance. There's a spotlighted area in the center of the stage, which we can call "root." This is where the main act (our React app) will perform. index.js: This is like the director of the play. The director decides which play (React app) will be performed and ensures it happens right in the spotlighted "root" area of the stage. The director instructs the actors (components) to start the play on the stage. So, the index.html provides the "hook" or the "connection point" for the JavaScript to latch onto and start rendering the React components, turning an empty stage into a full-blown performance. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":237,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":457320205},"returnTo":"/packs/21444640/subscribe"}' id='card-457320205'> <div class='header'> 237 </div> <div class='card-face question'> <div class='question-content'> que hace Jenkins ? </div> </div> <div class='card-face answer'> <div class='answer-content'> Detecta Cambios: Cada vez que un trabajador (desarrollador) crea o modifica una pieza (código), Jenkins lo nota. Prueba las Piezas: Antes de que la pieza se integre al producto final, Jenkins la verifica (compila y prueba) para asegurarse de que todo está bien y no hay errores. Arma el Producto: Si todas las piezas pasan la verificación, Jenkins las ensambla en un producto (una versión de la app) listo para ser entregado. Notificaciones: Si Jenkins encuentra un problema con alguna pieza, avisa al trabajador (desarrollador) para que lo corrija. Automatización: Jenkins hace todo esto automáticamente cada vez que detecta cambios, asegurándose de que el producto (la app) esté siempre en buen estado y listo para ser entregado al cliente o usuario. En resumen, Jenkins es como un supervisor automático que se asegura de que todo se haga bien y rápidamente en la fábrica de apps. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":238,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":457320735},"returnTo":"/packs/21444640/subscribe"}' id='card-457320735'> <div class='header'> 238 </div> <div class='card-face question'> <div class='question-content'> que es un pipeline? </div> </div> <div class='card-face answer'> <div class='answer-content'> Pipelines: Jenkins permite la creación de "pipelines" o tuberías, que son una serie de pasos automatizados que el código debe seguir desde que se envía hasta que se despliega. Estas tuberías pueden ser tan simples o complejas como se requiera, incluyendo fases de compilación, prueba, despliegue, y otros pasos personalizados. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":239,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":457320894},"returnTo":"/packs/21444640/subscribe"}' id='card-457320894'> <div class='header'> 239 </div> <div class='card-face question'> <div class='question-content'> que es mandar un app a producción? </div> </div> <div class='card-face answer'> <div class='answer-content'> Mandar una app a producción se refiere a desplegar una versión de la aplicación en un entorno donde los usuarios finales pueden acceder y usarla. Jenkins, gracias a su capacidad de entrega continua (CD), puede automatizar este proceso. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":240,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":457321739},"returnTo":"/packs/21444640/subscribe"}' id='card-457321739'> <div class='header'> 240 </div> <div class='card-face question'> <div class='question-content'> git, github, bitbucket </div> </div> <div class='card-face answer'> <div class='answer-content'> Git: Como mencionamos, es el diario mágico que ayuda a los programadores a llevar registro de todos los cambios en su código. Bitbucket: Es una caja fuerte en la nube donde se pueden guardar y compartir esos diarios mágicos. Ofrece algunas herramientas extra, especialmente si trabajas con otros productos de Atlassian. GitHub: Es otra caja fuerte en la nube, similar a Bitbucket, pero con sus propias características y herramientas. Es muy popular y ha desarrollado una gran comunidad alrededor. Piensa en ello como una biblioteca gigante donde mucha gente guarda y comparte sus diarios mágicos. Además de almacenar y compartir, ofrece herramientas para colaborar, discutir y mejorar esos diarios (código) junto con otros. Ambos, Bitbucket y GitHub, hacen esencialmente lo mismo: son servicios que alojan repositorios Git. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":241,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":460861072},"returnTo":"/packs/21444640/subscribe"}' id='card-460861072'> <div class='header'> 241 </div> <div class='card-face question'> <div class='question-content'> what indesOf does? </div> </div> <div class='card-face answer'> <div class='answer-content'> indexOf es un método de los arrays en JavaScript que retorna el primer índice en el que se encuentra un elemento dentro del array, o -1 si el elemento no se encuentra. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":242,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":460861116},"returnTo":"/packs/21444640/subscribe"}' id='card-460861116'> <div class='header'> 242 </div> <div class='card-face question'> <div class='question-content'> Los tres elementos que puede usar un map u otro metodo </div> </div> <div class='card-face answer'> <div class='answer-content'> La funcionTransformadora es una función que toma tres argumentos: elementoActual: el elemento actual del array que está siendo procesado. indice: el índice del elemento actual en el array. array: el array original sobre el que se llama map. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":243,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":460861528},"returnTo":"/packs/21444640/subscribe"}' id='card-460861528'> <div class='header'> 243 </div> <div class='card-face question'> <div class='question-content'> Cuales son los parametros de map? </div> </div> <div class='card-face answer'> <div class='answer-content'> Lo que colocas entre paréntesis en la función que proporcionas a .map() representa los argumentos que esta función recibirá. En el contexto del método map, estos argumentos son: elementoActual: El elemento actual del array que está siendo procesado. indice: El índice del elemento actual en el array. array: El array original sobre el que se está llamando map. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":244,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":460861561},"returnTo":"/packs/21444640/subscribe"}' id='card-460861561'> <div class='header'> 244 </div> <div class='card-face question'> <div class='question-content'> Proque hay veces que el .map . filter no usan el return? </div> </div> <div class='card-face answer'> <div class='answer-content'> Cuando trabajas con métodos como .map(), .filter(), y otros métodos de arrays, las funciones de flecha sin llaves son comunes porque hacen que el código sea más conciso. Sin embargo, si necesitas realizar múltiples operaciones o declaraciones dentro de tu función, es probable que desees usar llaves y return: </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":245,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":460862287},"returnTo":"/packs/21444640/subscribe"}' id='card-460862287'> <div class='header'> 245 </div> <div class='card-face question'> <div class='question-content'> Caso de uso del indexOf </div> </div> <div class='card-face answer'> <div class='answer-content'> indexOf(valor) devuelve el índice de la primera aparición del valor en el array. Si tienes múltiples apariciones de un valor, indexOf siempre te dará el índice de la primera aparición. Durante la iteración de filter, para cada valor, se verifica si el índice de la primera aparición del valor (array.indexOf(valor)) es igual al index actual. Si es igual, significa que estás viendo la primera aparición de ese valor en el array, por lo que lo conservas. Si no es igual, estás viendo una aparición duplicada, por lo que no lo conservas. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":246,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":460862317},"returnTo":"/packs/21444640/subscribe"}' id='card-460862317'> <div class='header'> 246 </div> <div class='card-face question'> <div class='question-content'> how to use filter method? what is expecting? </div> </div> <div class='card-face answer'> <div class='answer-content'> filter method on an array, it's expecting a Boolean value (true or false) to determine whether to keep or remove an item from the filtered result. Returning anything other than a Boolean will lead to unexpected results. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":247,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":461147022},"returnTo":"/packs/21444640/subscribe"}' id='card-461147022'> <div class='header'> 247 </div> <div class='card-face question'> <div class='question-content'> how to debug in react? </div> </div> <div class='card-face answer'> <div class='answer-content'> cuando sale un error y no es especifico, del return is comentado y sacar cosas (rami) </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":248,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":461779575},"returnTo":"/packs/21444640/subscribe"}' id='card-461779575'> <div class='header'> 248 </div> <div class='card-face question'> <div class='question-content'> useState what it does? example </div> </div> <div class='card-face answer'> <div class='answer-content'> -react hook -A Hook is a special function that lets you “hook into” React features. -create a variable with an state -save it and update it when needed -when states changes it rerenders the component -example if the counter/contandor </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":249,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":461779578},"returnTo":"/packs/21444640/subscribe"}' id='card-461779578'> <div class='header'> 249 </div> <div class='card-face question'> <div class='question-content'> useEffect </div> </div> <div class='card-face answer'> <div class='answer-content'> React allows you to perform side effects in function components. Side effects could be anything from data fetching </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":250,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":462064659},"returnTo":"/packs/21444640/subscribe"}' id='card-462064659'> <div class='header'> 250 </div> <div class='card-face question'> <div class='question-content'> define a hook </div> </div> <div class='card-face answer'> <div class='answer-content'> hooks are indeed functions, but they come with a few important rules and characteristics that distinguish them from regular JavaScript functions: They can only be called from function components They encapsulate logic They start with the word "use": By convention, all hooks should start with the word "use". This convention makes it easier to identify hooks in the codebase. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":251,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":462064946},"returnTo":"/packs/21444640/subscribe"}' id='card-462064946'> <div class='header'> 251 </div> <div class='card-face question'> <div class='question-content'> useMemo or cache a value </div> </div> <div class='card-face answer'> <div class='answer-content'> -es como useEffect pero guarando un valor, que se vuelve a calcular segun la depedencia si cambia useMemo returns a memorized value. You give it a function that computes a value, and a list of dependencies. The value will only be recomputed when one of the dependencies has changed since the last render. Otherwise, useMemo will return the previous value. In the second version, the filtering is only recalculated if items or filterText change. Otherwise, the filtered value from the previous render is reused. This can save time if the filtering process is computationally intensive. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":252,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":462065681},"returnTo":"/packs/21444640/subscribe"}' id='card-462065681'> <div class='header'> 252 </div> <div class='card-face question'> <div class='question-content'> useCallback or cache a function </div> </div> <div class='card-face answer'> <div class='answer-content'> las funciones en cada render se vuelven a buildear. En memoria se vuelven a crear por cada render. </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":253,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":462068662},"returnTo":"/packs/21444640/subscribe"}' id='card-462068662'> <div class='header'> 253 </div> <div class='card-face question'> <div class='question-content'> TypeScript </div> </div> <div class='card-face answer'> <div class='answer-content'> https://www.youtube.com/watch?v=HCXPJmtV47I&ab_channel=Daniel-SelfMadeProgrammer </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":254,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":491414547},"returnTo":"/packs/21444640/subscribe"}' id='card-491414547'> <div class='header'> 254 </div> <div class='card-face question'> <div class='question-content'> Absolute vs relative path. We use ABSOLUTE </div> </div> <div class='card-face answer'> <div class='answer-content'> Relative Paths: Definition: A relative path specifies the location of a file or module relative to the current file. It starts with either a dot (".") for the current directory, two dots ("..") for the parent directory, or a combination of both and folder names. Absolute path // Assuming MyComponent.js is located at the root of the project import MyComponent from '/src/components/MyComponent'; </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":255,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":491414732},"returnTo":"/packs/21444640/subscribe"}' id='card-491414732'> <div class='header'> 255 </div> <div class='card-face question'> <div class='question-content'> 5 types of react hooks </div> </div> <div class='card-face answer'> <div class='answer-content'> 1. state (state, reducer) 2. context 3. ref 4. effect 5. perfomance (memo, callback) </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":256,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":560633794},"returnTo":"/packs/21444640/subscribe"}' id='card-560633794'> <div class='header'> 256 </div> <div class='card-face question'> <div class='question-content'> react strict mode </div> </div> <div class='card-face answer'> <div class='answer-content'> wrap your app and console gives you warnings </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":257,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":560633876},"returnTo":"/packs/21444640/subscribe"}' id='card-560633876'> <div class='header'> 257 </div> <div class='card-face question'> <div class='question-content'> what are refs </div> </div> <div class='card-face answer'> <div class='answer-content'> you want to work direclty with dom, and make reference to the dom elements </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":258,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":560634008},"returnTo":"/packs/21444640/subscribe"}' id='card-560634008'> <div class='header'> 258 </div> <div class='card-face question'> <div class='question-content'> what are portals? </div> </div> <div class='card-face answer'> <div class='answer-content'> are for when you need to overstep a component. like a modal, or dropdown </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":259,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":560634094},"returnTo":"/packs/21444640/subscribe"}' id='card-560634094'> <div class='header'> 259 </div> <div class='card-face question'> <div class='question-content'> what is suspense? </div> </div> <div class='card-face answer'> <div class='answer-content'> when a compoennt is taking time to load an you need to use an spinner or similar </div> </div> </div> <div class='flashcard-row thin-card is-blurrable' data='{"aSoundUrl":null,"cardIsBlurrable":true,"number":260,"qSoundUrl":null,"resources":{"deckId":13606052,"packId":21444640,"cardId":560634171},"returnTo":"/packs/21444640/subscribe"}' id='card-560634171'> <div class='header'> 260 </div> <div class='card-face question'> <div class='question-content'> what are boundaries or error bonderies? </div> </div> <div class='card-face answer'> <div class='answer-content'> fallback components when main component fails </div> </div> </div> </div> </div> </div> <div class='flashcards-sidebar'> <div class='sidebar-header'> <div class='react-component' id='flashcards-search-bar'> <div class='placeholder market-search-bar' id='flashcards-search-bar-placeholder'></div> </div> </div> <div class='sidebar-content'> <p class='deck-subject-heading'> <a class="decks-in-subject-link" href="/packs/front-basic-21444640"><span class="pack-name">Front Basic</span> (13 decks) </a></p> <ul class='deck-list-items'> <a class='deck-link selected' href='/flashcards/general-concepts-13606052/packs/21444640'> <li class='deck-list-item'>General Concepts</li> </a> <a class='deck-link ' href='/flashcards/teoria-13659136/packs/21444640'> <li class='deck-list-item'>Teoria</li> </a> <a class='deck-link ' href='/flashcards/pinyin-13851791/packs/21444640'> <li class='deck-list-item'>Pinyin</li> </a> <a class='deck-link ' href='/flashcards/hanzi-13851872/packs/21444640'> <li class='deck-list-item'>Hanzi</li> </a> <a class='deck-link ' href='/flashcards/c-cai-13873365/packs/21444640'> <li class='deck-list-item'>C#-CAI</li> </a> <a class='deck-link ' href='/flashcards/chp-1-14005060/packs/21444640'> <li class='deck-list-item'>CHP 1</li> </a> <a class='deck-link ' href='/flashcards/chinese-tourism-14265328/packs/21444640'> <li class='deck-list-item'>Chinese Tourism</li> </a> <a class='deck-link ' href='/flashcards/ftime-15286709/packs/21444640'> <li class='deck-list-item'>FTime</li> </a> <a class='deck-link ' href='/flashcards/chinese-nivel-i-cui-15550751/packs/21444640'> <li class='deck-list-item'>Chinese Nivel I CUI</li> </a> <a class='deck-link ' href='/flashcards/chinese-nivel-i-cui-break-16372138/packs/21444640'> <li class='deck-list-item'>Chinese Nivel I CUI Break</li> </a> <a class='deck-link ' href='/flashcards/aws-16390127/packs/21444640'> <li class='deck-list-item'>AWS</li> </a> <a class='deck-link ' href='/flashcards/chinese-nivel-ii-cui-16568798/packs/21444640'> <li class='deck-list-item'>Chinese Nivel II CUI</li> </a> <a class='deck-link ' href='/flashcards/python-knowlegde-sessions-16623049/packs/21444640'> <li class='deck-list-item'>Python | Knowlegde Sessions</li> </a> </ul> </div> </div> </div> <div id='tooltip-controller'></div> <div data='{"packId":21444640,"source":"spaced-repetition-modal","subject":"Front Basic","resources":{"deckId":13606052,"packId":21444640},"returnTo":"/packs/21444640/subscribe"}' id='spaced-repetition-modal-controller'></div> <div id='banner-controller'></div> <div id='dialog-modal-controller'></div> <div class='band band-footer'> <div class='footer-main'> <ul class='sections'> <li class='section key-links'> <p class='section-heading'> Key Links </p> <ul class='options-list'> <li class='option'> <a id="footer-pricing-link" class="option-link" href="/pricing?paywall=upgrade">Pricing</a> </li> <li class='option'> <a class="option-link" href="/companies">Corporate Training</a> </li> <li class='option'> <a class="option-link" href="/teachers">Teachers & Schools</a> </li> <li class='option'> <a class="option-link" target="_blank" rel="nofollow noopener noreferrer" href="https://itunes.apple.com/us/app/brainscape-smart-flashcards/id442415567?mt=8">iOS App</a> </li> <li class='option'> <a class="option-link" target="_blank" rel="nofollow noopener noreferrer" href="https://play.google.com/store/apps/details?id=com.brainscape.mobile.portal">Android App</a> </li> <li class='option'> <a class="option-link" target="_blank" rel="noopener" href="https://www.brainscape.com/faq">Help Center</a> </li> </ul> </li> <li class='section subjects'> <p class='section-heading'> Subjects </p> <ul class='options-list'> <li class='option'> <a class="option-link" href="/subjects/medical-nursing">Medical & Nursing</a> </li> <li class='option'> <a class="option-link" href="/subjects/law">Law Education</a> </li> <li class='option'> <a class="option-link" href="/subjects/foreign-languages">Foreign Languages</a> </li> <li class='option'> <a class="option-link" href="/subjects-directory/a">All Subjects A-Z</a> </li> <li class='option certified-classes'> <a class="option-link" href="/learn">All Certified Classes</a> </li> </ul> </li> <li class='section company'> <p class='section-heading'> Company </p> <ul class='options-list'> <li class='option'> <a class="option-link" href="/about">About Us</a> </li> <li class='option'> <a target="_blank" class="option-link" rel="nofollow noopener noreferrer" href="https://brainscape.zendesk.com/hc/en-us/articles/115002370011-Can-I-earn-money-from-my-flashcards-">Earn Money!</a> </li> <li class='option'> <a target="_blank" class="option-link" href="https://www.brainscape.com/academy">Academy</a> </li> <li class='option'> <a target="_blank" class="option-link" href="https://brainscapeshop.myspreadshop.com/all">Swag Shop</a> </li> <li class='option'> <a target="_blank" rel="nofollow noopener" class="option-link" href="/contact">Contact</a> </li> <li class='option'> <a target="_blank" rel="nofollow noopener" class="option-link" href="/terms">Terms</a> </li> <li class='option'> <a target="_blank" class="option-link" href="https://www.brainscape.com/academy/brainscape-podcasts/">Podcasts</a> </li> <li class='option'> <a target="_blank" class="option-link" href="/careers">Careers</a> </li> </ul> </li> <li class='section find-us'> <p class='section-heading'> Find Us </p> <ul class='social-media-list'> <li class='option twitter-badge group'> <a rel="nofollow noopener noreferrer" target="_blank" class="option-link" href="https://twitter.com/Brainscape"><img data-src="/pks/images/shared/twitterx-af917e8b474ed7c95a19.svg" alt="twitter badge" class="lazy-load" src="/pks/images/shared/placeholder-2f8e0834f3c4456dc1cc.jpg" width="24" height="24" /></a> </li> <li class='option linkedin-badge group'> <a rel="nofollow noopener noreferrer" target="_blank" class="option-link" href="https://www.linkedin.com/company/brainscape/"><img data-src="/pks/images/shared/linkedin-2f15819658f768056cef.svg" alt="linkedin badge" class="lazy-load" src="/pks/images/shared/placeholder-2f8e0834f3c4456dc1cc.jpg" width="24" height="24" /></a> </li> <li class='option facebook-badge group'> <a rel="nofollow noopener noreferrer" target="_blank" class="option-link" href="https://www.facebook.com/Brainscape"><img data-src="/pks/images/shared/facebook-1598a44227eabc411188.svg" alt="facebook badge" class="lazy-load" src="/pks/images/shared/placeholder-2f8e0834f3c4456dc1cc.jpg" width="24" height="24" /></a> </li> <li class='option youtube-badge group'> <a rel="nofollow noopener noreferrer" target="_blank" class="option-link" href="https://www.youtube.com/c/BrainscapeNY"><img data-src="/pks/images/shared/youtube-7f2994b2dc1891582524.svg" alt="youtube badge" class="lazy-load" src="/pks/images/shared/placeholder-2f8e0834f3c4456dc1cc.jpg" width="24" height="24" /></a> </li> <li class='option pinterest-badge group'> <a rel="nofollow noopener noreferrer" target="_blank" class="option-link" href="https://www.pinterest.com/brainscape/"><img data-src="/pks/images/shared/pinterest-04f51aa292161075437b.svg" alt="pinterest badge" class="lazy-load" src="/pks/images/shared/placeholder-2f8e0834f3c4456dc1cc.jpg" width="24" height="24" /></a> </li> <li class='option tiktok-badge group'> <a rel="nofollow noopener noreferrer" target="_blank" class="option-link" href="https://www.tiktok.com/@brainscapeu"><img data-src="/pks/images/shared/tiktok-644cf4608bd73fbbb24f.svg" alt="tiktok badge" class="lazy-load" src="/pks/images/shared/placeholder-2f8e0834f3c4456dc1cc.jpg" width="24" height="24" /></a> </li> <li class='option insta-badge group'> <a rel="nofollow noopener noreferrer" target="_blank" class="option-link" href="https://www.instagram.com/brainscape/"><img data-src="/pks/images/shared/insta-210cc2d059ae807961d2.svg" alt="insta badge" class="lazy-load" src="/pks/images/shared/placeholder-2f8e0834f3c4456dc1cc.jpg" width="24" height="24" /></a> </li> </ul> <div class='get-the-app'> <div class='qr-code'> <img data-src="https://www.brainscape.com/assets/cms/public-views/shared/shortio-from-homepage.png" alt="QR code" class="lazy-load" src="/pks/images/shared/placeholder-2f8e0834f3c4456dc1cc.jpg" width="130" height="130" /> </div> <div class='app-badges'> <div class='badge apple-badge'> <a rel="nofollow noopener noreferrer" target="_blank" class="option-link" href="https://apps.apple.com/us/app/brainscape-smart-flashcards/id442415567"><img data-src="/pks/images/shared/apple-badge-b6e4f380fb879821d601.svg" alt="apple badge" class="lazy-load" src="/pks/images/shared/placeholder-2f8e0834f3c4456dc1cc.jpg" width="124" height="50" /></a> </div> <div class='badge android-badge'> <a rel="nofollow noopener noreferrer" target="_blank" class="option-link" href="https://play.google.com/store/apps/details?id=com.brainscape.mobile.portal&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1"><img data-src="/pks/images/shared/android-badge-a2251833dc7f6ca8879c.svg" alt="android badge" class="lazy-load" src="/pks/images/shared/placeholder-2f8e0834f3c4456dc1cc.jpg" width="124" height="50" /></a> </div> </div> </div> </li> </ul> </div> <div class='footer-blurb'> Brainscape helps you reach your goals faster, through stronger study habits. <br> © 2025 Bold Learning Solutions. <a class="option-link" href="/terms">Terms and Conditions</a> </div> </div> <script> if (typeof window.__REACT_DEVTOOLS_GLOBAL_HOOK__ === 'object') { __REACT_DEVTOOLS_GLOBAL_HOOK__.inject = function() {}; } </script> <script> window.addEventListener('load', () => { setTimeout(() => { const script = document.createElement('script'); script.src = "/pks/js/public-flashcards-page-9140413b5150ce9700f9.js"; script.defer = true; document.body.appendChild(script); }, 0); }); </script> <script src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js" defer="defer"></script> <script> document.addEventListener("mainSharedready", () => { GaHelper.setGaDimension("dimension1","No"); }); </script> <script type='application/ld+json'> {"@context":"https://schema.org/","@type":"Quiz","about":{"@type":"Thing","name":"General Concepts"},"hasPart":[{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"Synchronous operations","acceptedAnswer":{"@type":"Answer","text":"are executed one at a time, and each operation must complete before the next one can start. In other words, synchronous operations block the execution of the program until they are finished."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"asynchronous operations","acceptedAnswer":{"@type":"Answer","text":"do not block the execution of the program. Instead, they are designed to allow the program to continue executing other tasks while waiting for the asynchronous operation to complete."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"purpose of a callback","acceptedAnswer":{"@type":"Answer","text":"to specify a function that will be executed or called at a later point in the program, often as a response to an event or the completion of an asynchronous operation."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"setState what is does? is syncronic?","acceptedAnswer":{"@type":"Answer","text":"When you call setState, React will update the state object and trigger a re-rendering of the component, which means the component will update and reflect the new state. The setState method in React is typically asynchronous. This means that calling setState doesn't immediately update the state and re-render"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"this.state = { counter: 0, name: 'John' }; how to access to counter state?","acceptedAnswer":{"@type":"Answer","text":"this.state.counter holds the value of the counter, and this.state.name holds the value of the name."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"when getDerivedStateFromProps is called?","acceptedAnswer":{"@type":"Answer","text":"getDerivedStateFromProps is a static method that is called before rendering and is invoked whenever the component is receiving new props or state updates."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"getDerivedStateFromProps method for funtions?","acceptedAnswer":{"@type":"Answer","text":"It should be used for pure calculations based on props and state, without relying on any component-specific instance variables or methods."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"can I use this in getDerivedStateFromProps?","acceptedAnswer":{"@type":"Answer","text":"is a static method, so you cannot access the this keyword or the component instance within this method"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"why getDerivedStateFromProps is static?","acceptedAnswer":{"@type":"Answer","text":"By making it static, it is enforced that the method does not have access to the component instance (this) and cannot modify any instance-specific data or invoke instance methods. meaning its output solely depends on the inputs and does not have any side effects."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is a static method?","acceptedAnswer":{"@type":"Answer","text":"A static method in JavaScript is a method that belongs to a class itself rather than to an instance of the class."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is a class?","acceptedAnswer":{"@type":"Answer","text":"a class is a template for creating objects of a particular type. It defines the properties (attributes) and behaviors (methods) that the objects instantiated from the"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"How to cretae an instance of this class? class Person { constructor(name, age) { this.name = name; this.age = age; } sayHello() { console.log(`Hello, my name is ${this.name} and I am ${this.age} years old.`); } }","acceptedAnswer":{"@type":"Answer","text":"const person1 = new Person('John Doe', 25); person1.sayHello();"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"Which are the propertes and methos od this object? const person = { name: 'John Doe', age: 25, sayHello: function() { console.log(`Hello, my name is ${this.name} and I am ${this.age} years old.`); } };","acceptedAnswer":{"@type":"Answer","text":"In this example, the person object has two properties (name and age) and a method (sayHello)."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"is a class intance same as an object?","acceptedAnswer":{"@type":"Answer","text":"Yes, in the context of object-oriented programming, a class instance and an object are essentially the same thing."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is object-oriented programming?","acceptedAnswer":{"@type":"Answer","text":"Object-oriented programming (OOP) is a programming paradigm that organizes code based on the concept of objects, which are instances of classes."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is a stack /pila?","acceptedAnswer":{"@type":"Answer","text":"a stack is an abstract data type that represents a collection of elements with a particular behavior known as last-in, first-out (LIFO). It is named \"stack\" because it resembles a stack of objects where new items are added to the top and removed from the top."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"three main phases of react lifycle","acceptedAnswer":{"@type":"Answer","text":"mounting, updating, and unmounting."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"4 methods of mounting phase","acceptedAnswer":{"@type":"Answer","text":"constructor() static getDerivedStateFromProps() render() componentDidMount()"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"5 methods of Updating phase","acceptedAnswer":{"@type":"Answer","text":"static getDerivedStateFromProps() shouldComponentUpdate() render() getSnapshotBeforeUpdate() componentDidUpdate()"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"1 method of Unmounting phase","acceptedAnswer":{"@type":"Answer","text":"componentWillUnmount()"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what are the purpose of hooks?","acceptedAnswer":{"@type":"Answer","text":"Hooks are a feature that allows developers to use state and other React features in functional components without the need for class components."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is jest?","acceptedAnswer":{"@type":"Answer","text":"Jest is a popular JavaScript testing framework developed by Facebook. Jest is a testing framework that provides the overall test running infrastructure. It provides functionalities such as organizing your tests into suites and test cases, providing test doubles (mocks, spies, etc.), measuring code coverage, and offering utilities for assertions. Jest does not tie you to a specific way of testing and can be used with various testing approaches and libraries."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is enzyme?","acceptedAnswer":{"@type":"Answer","text":"Enzyme is a JavaScript testing utility developed by Airbnb that provides additional testing capabilities for React components. It is often used in conjunction with Jest or other testing frameworks to facilitate the testing of React components in isolation. As of September 2020, Airbnb has officially announced that Enzyme development and maintenance have been discontinued."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is react testing library?","acceptedAnswer":{"@type":"Answer","text":"React Testing Library is a popular testing utility for React applications that promotes testing React components in a way that resembles how users interact with the application. It emphasizes testing components based on their rendered output and behavior rather than focusing on implementation details."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"prevState vs prevProps","acceptedAnswer":{"@type":"Answer","text":"prevState represents the previous state of a component, while prevProps represents the previous props of a component."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is is truthy? 6","acceptedAnswer":{"@type":"Answer","text":"true: The boolean value true is obviously truthy. Non-empty strings: Any string that contains at least one character is considered truthy. Non-zero numbers: Any number that is not zero (positive or negative) is considered truthy. Objects: Any object, including arrays and functions, is considered truthy. Arrays: Arrays are objects in JavaScript, so they are also considered truthy. Functions: Functions are objects as well and are considered truthy."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"you can use square brackets [] to enclose the elements of .....","acceptedAnswer":{"@type":"Answer","text":"an array"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"you can use curly braces {} to enclose ....","acceptedAnswer":{"@type":"Answer","text":"an object. const myObject = { name: 'John', age: 25, city: 'New York', isStudent: true, };"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is a fetch?","acceptedAnswer":{"@type":"Answer","text":"fetch is a built-in function used to make asynchronous network requests and retrieve resources from a specified URL. The fetch function takes a URL as its first argument and returns a Promise that resolves to the response of the request."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"how is a fetch structure? 3 parts","acceptedAnswer":{"@type":"Answer","text":"fetch(url) .then(response =\u003e { // Handle the response }) .catch(error =\u003e { // Handle any errors });"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is response.json in a fetch?","acceptedAnswer":{"@type":"Answer","text":"In the fetch function, the response.json() method is used to extract the response data as JSON. It returns a Promise that resolves to the parsed JSON data from the response body. fetch('https://api.example.com/data') .then(response =\u003e response.json()) .then(data =\u003e { // Handle the parsed JSON data console.log(data); }) .catch(error =\u003e { // Handle any errors console.error('Error:', error); });"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"how is the json format?","acceptedAnswer":{"@type":"Answer","text":"it variaety that is why we have JSON.stringify() function is used to convert JavaScript objects into JSON strings, while JSON.parse() is used to parse a JSON string and convert it into a JavaScript object."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is a script?","acceptedAnswer":{"@type":"Answer","text":"A script is typically used to automate tasks or perform specific operations. It can be written to interact with a system, manipulate data, control the behavior of a program, or perform various other functions. Popular scripting languages include JavaScript, Python, Ruby, Perl, Bash, PowerShell, and many others."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"give an example of a class and class intances with a car","acceptedAnswer":{"@type":"Answer","text":"class Car: def __init__(self, make, model, year): self.make = make self.model = model self.year = year def display_info(self): print(fMake: {self.make}, Model: {self.model}, Year: {self.year}) Creating car instances car1 = Car(Toyota, Camry, 2020) car2 = Car(Honda, Civic, 2018) car3 = Car(Ford, Mustang, 2022)"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"Are objects same as class?","acceptedAnswer":{"@type":"Answer","text":"Objects are instances of a class created with specifically defined data. Objects can correspond to real-world objects or an abstract entity."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"How does fetch works with a promise?","acceptedAnswer":{"@type":"Answer","text":"To get data using promises in JavaScript, you typically use the fetch() function, which returns a promise that resolves to the response of the HTTP request. fetch('https://api.example.com/data') .then(response =\u003e response.json()) // Parse the response as JSON .then(data =\u003e { // Work with the data console.log(data); }) .catch(error =\u003e { // Handle any errors that occurred during the request console.error('Error:', error); });"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"¿Qué es ESLint?","acceptedAnswer":{"@type":"Answer","text":"ESLint es una herramienta de código abierto enfocada en el proceso de \"lintig\" para javascript (o más correctamente para ECMAScript). ESLint es la herramienta predominante para la tarea de \"limpiar\" código javascript tanto en el servidor (node. js) como en el navegador. \"Linting\" es un proceso que se realiza en la etapa de desarrollo para verificar el código y encontrar cualquier problema potencial. Un \"linter\" es una herramienta que se usa en este proceso. El linter realiza varias comprobaciones en el código, como la detección de errores de sintaxis, errores de formato, errores de estilos de codificación y otros problemas posibles. Un linter muy popular para JavaScript es ESLint. Puedes personalizar las reglas de ESLint según tus necesidades, lo que significa que puedes definir tus propios estándares de estilo de código y hacer que ESLint verifique el código en consecuencia."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"What is npm?","acceptedAnswer":{"@type":"Answer","text":"npm comes bundled with it. With npm, you can: Author your own Node.js modules (packages), and publish them on the npm website so that other people can download and use them Use other people's authored modules (packages) So, ultimately, npm is all about code sharing and reuse. You can use other people's code in your own projects, and you can also publish your own Node.js modules so that other people can use them."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"Que es deploy?","acceptedAnswer":{"@type":"Answer","text":"Deployment is the mechanism through which applications, modules, updates, and patches are delivered from developers to users."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"What package.json is?","acceptedAnswer":{"@type":"Answer","text":"The package. json file is the heart of any Node project. It records important metadata about a project which is required before publishing to NPM, and also defines functional attributes of a project that npm uses to install dependencies, run scripts, and identify the entry point to our package."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"3 things to do with new code in j s","acceptedAnswer":{"@type":"Answer","text":"The methods used by developers to build, test and deploy new code."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"Code in dev","acceptedAnswer":{"@type":"Answer","text":"-You can check which git commit the code has been put in dev from."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"Dev enviroment","acceptedAnswer":{"@type":"Answer","text":"A development environment in software and web development is a workspace for developers to make changes without breaking anything in a live environment."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"Production enviroment","acceptedAnswer":{"@type":"Answer","text":"A production environment is a real-time setting where the latest versions of software, products, or updates are pushed into live, usable operation for the intended end users."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"You deploy to...","acceptedAnswer":{"@type":"Answer","text":"enviroments.... could be dev, uat, uat2..."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"What does j s does?","acceptedAnswer":{"@type":"Answer","text":"you can deploy, is a pipeline that has a code commit source, then a build, a test and a deply to the desire enviroment."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"What are props? aka properties","acceptedAnswer":{"@type":"Answer","text":"which stands for properties and is being used for passing data from one component to another. But the important part here is that data with props are being passed in a uni-directional flow. IMMUTABLE BY CHILDS"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"What is a state?","acceptedAnswer":{"@type":"Answer","text":"The state is a built-in React object that is used to contain data or information about the component. A component's state can change over time; whenever it changes, the component re-renders."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"When a components re-renders?","acceptedAnswer":{"@type":"Answer","text":"React components automatically re-render whenever there is a change in their state or props."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"CONTEXT API- useContext to avoid props drilling porblems to super grand childrends :(, like red hairs!","acceptedAnswer":{"@type":"Answer","text":"for global states"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"Example of useContext dark/light theme in an website","acceptedAnswer":{"@type":"Answer","text":"affect all the components and all components should known the state. Is a GLOBAL STATE. SHARE Global data :) Tipical, userPermission according to id"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"GLOBAL STATES: You need (3)","acceptedAnswer":{"@type":"Answer","text":"-create a context -useContext -provider for the context -then you can access from x component to that needed state of the context. -you create a global state"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"theme.provider or x.provider. What it does?","acceptedAnswer":{"@type":"Answer","text":"The Provider component accepts a value prop to be passed to consuming components that are descendants of this Provider."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"memoization,   const value = useMemo(() =\u003e ({a, b}), [a, b]); what is for?","acceptedAnswer":{"@type":"Answer","text":"avoiding unnecessary rendering when two props are the same but different objects"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"Statefull component","acceptedAnswer":{"@type":"Answer","text":"Needs states, just like input of my fav coutries to live in!"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"Stateless component","acceptedAnswer":{"@type":"Answer","text":"dosent have states, it could use props!"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"props drilling! We hate... we fix with...","acceptedAnswer":{"@type":"Answer","text":"useContext :)"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"uncontrolled component","acceptedAnswer":{"@type":"Answer","text":"is a component that maintains its own internal state. No component re-renders. Browser DOM handles the changes to the element. If you are using a form, you are NOT using setState to capture input. Instead you could be using useRef hook to capture node value, current.value. Is an state matain by the DOM"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"controlled component","acceptedAnswer":{"@type":"Answer","text":"a controlled component is a component that is controlled by React state. Ex. form input use UseState to update input values and save it as internal state of the component "}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"array destructuring Example :)","acceptedAnswer":{"@type":"Answer","text":"Destructuring the array in JavaScript simply means extracting multiple values from data stored in objects and arrays"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"object destructuring","acceptedAnswer":{"@type":"Answer","text":"Destructuring the array in JavaScript simply means extracting multiple values from data stored in objects and arrays"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"array of objects, how to write it?","acceptedAnswer":{"@type":"Answer","text":"const array = [ {id:1, name: \"Peter\"}, {id:2, name: \"John\"} ]"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"how to map over an array of objects and show the name? {asianCountries.map(( x, y )=\u003e {xxx})}","acceptedAnswer":{"@type":"Answer","text":"{asianCountries.map((country, id )=\u003e {country.name})} order of country and id, country.name"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"4 basic html things for a form:","acceptedAnswer":{"@type":"Answer","text":"1. form 2. label 3. input 4. button"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"useState hook from React, what is and what returns?","acceptedAnswer":{"@type":"Answer","text":"is a function that returns an array with two elements: the current state value (in this case, an object representing a car) and a function to update that state (in this case, setCar)."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is APi?","acceptedAnswer":{"@type":"Answer","text":"es una interfaz que te permite \"comunicar\" cosas que hablan diferentes. Ej celular tipeo. Las APIs comunican programas/sistemas entre si. Ejemplo integraciones, fb con ig, misma publicación. Un API es un programa para ser usado por otro programa. Asi como en cualquier programa al tu interactuar con el , ingresando datos el programa te responde. Tu puedes hacer un programa que interactue con otro programa (API) y de esta manera tu programa disfrutara de los beneficios que le pueda ofrecer la AP"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"pure vs impure functions","acceptedAnswer":{"@type":"Answer","text":"Pure Functions: A pure function is a function that always returns the same output given the same inputs. It has no side effects, meaning it does not modify external state or variables, nor does it interact with the outside world (e.g., API calls, DOM manipulation). Pure functions are predictable and easier to reason about since they only rely on their input arguments and have no hidden dependencies. In React, pure functions are commonly used for components that are based solely on their props. Given the same props, they always render the same output."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"useEffect when it renders?","acceptedAnswer":{"@type":"Answer","text":"By default, if no second argument is provided to the useEffect function, the effect will run after every render."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is a const with an arrow function in react?","acceptedAnswer":{"@type":"Answer","text":"a const with an arrow function refers to creating a constant variable that holds an arrow function. Arrow functions are a concise way to define functions in JavaScript, and they have a more compact syntax compared to traditional function expressions. const sayHello = (name) =\u003e { return 'Hello ' + name; }"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is a function?","acceptedAnswer":{"@type":"Answer","text":"A function is a fundamental concept in programming and refers to a reusable block of code that performs a specific task or set of tasks. Functions help in organizing code into logical and manageable pieces, making it easier to read, write, and maintain."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"inputs in fucntions are called...","acceptedAnswer":{"@type":"Answer","text":"arguments or parameters"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"JS is syncronims or asyncronic?","acceptedAnswer":{"@type":"Answer","text":"Although it's synchronous by nature, JavaScript benefits from asynchronous code."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"Object.keys(user)","acceptedAnswer":{"@type":"Answer","text":"Object.keys(user) is a JavaScript method that is used to extract an array of keys from an object. In this context, it seems like user is an object, and Object.keys(user) is being used to check if the object has any properties (keys) or not."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"single thread JS","acceptedAnswer":{"@type":"Answer","text":"Node.js runs JavaScript code in a single thread, which means that your code can only do one task at a time."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"is fetching data a side effect?","acceptedAnswer":{"@type":"Answer","text":"fetching data from a third-party API is considered a side-effect."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is AJAX? not football :)","acceptedAnswer":{"@type":"Answer","text":"AJAX = Asynchronous JavaScript"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is a reducer?","acceptedAnswer":{"@type":"Answer","text":"Components with many state updates spread across many event handlers can get overwhelming. For these cases, you can consolidate all the state update logic outside your component in a single function, called a reducer."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"when to use useReducer and useState","acceptedAnswer":{"@type":"Answer","text":"useState, it's better to use it with primitive data types, such as strings, numbers, or booleans. The useReducer hook is best used on more complex data, specifically, arrays or objects."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is a custum hook?","acceptedAnswer":{"@type":"Answer","text":"A custom hook is simply a way to extract a piece of functionality that you can use again and again. A custom hook is essentially a JavaScript function that starts with the word use and can call other hooks. By convention, hooks always start with the word use. "}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"when to use useReducer hook","acceptedAnswer":{"@type":"Answer","text":"alternative to useState, but updates different the state manage its state with a reducer. inspire in redux! where the state logic is more complex and involves multiple sub-states or actions that affect each other. It can help to avoid prop drilling (passing state down through multiple layers of components) and can lead to more maintainable and predictable code. Base on an action the state will increment or decrement."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"const [state, dispatch], what is this called? const [state, dispatch] = useReducer(reducer, initialState)","acceptedAnswer":{"@type":"Answer","text":"This is array destructuring in JavaScript. We are using it here to extract two values from the return value of the useReducer hook. Extraes el stata y el dispatch del hook useReducer que devuelve un array."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"where I can find JSX?","acceptedAnswer":{"@type":"Answer","text":"JSX allows developers to write HTML-like code within JavaScript, making it easier to create and manipulate the UI components in React applications. JSX is used in the return statement of a React component."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is used above the return in react?","acceptedAnswer":{"@type":"Answer","text":"JavaScript is commonly used above the return statement in a React component. The code above the return statement typically includes various JavaScript constructs,"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what react does with components?","acceptedAnswer":{"@type":"Answer","text":"combines components to create a view/screen"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is a state?","acceptedAnswer":{"@type":"Answer","text":"values of variables you have on yoour components."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"aim of npm","acceptedAnswer":{"@type":"Answer","text":"npm is all about code sharing and reuse. You can use other people's code in your own projects, and you can also publish your own Node.js modules so that other people can use them."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"node.js why is needed?","acceptedAnswer":{"@type":"Answer","text":"React itself can be used without Node.js in the client-side browser environment, having Node.js installed can greatly facilitate the development, deployment, and overall build process when working with React projects. -js is a language that can be run in the browser, but for that needs interpretation, js enginee or babel. -you can use node js as a server side component and enables you to use javascript as a fullstack (front and back end) -a javascript runtime enviroment"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is react (2)?","acceptedAnswer":{"@type":"Answer","text":"React is just a front-end library. You're going to need to interact with other third-party libraries. client-side library. You do need to figure out how you're going to do routing and server client communication."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"which is react design philosphy?","acceptedAnswer":{"@type":"Answer","text":"component based arquitecture, for reusable component code -colecction of components -example: header, payment, sidebar"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"advantages of components? (3)","acceptedAnswer":{"@type":"Answer","text":"reusable independent stand alone parts"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is the DOM and how to edit it?","acceptedAnswer":{"@type":"Answer","text":"It represents a web page as a tree-like structure of objects. Each object corresponds to an HTML element or content on the page. Developers can use the DOM to interact with and modify the page's content, structure, and style using JavaScript."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"react virtual dom","acceptedAnswer":{"@type":"Answer","text":"tbd.."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"functional components acts like...","acceptedAnswer":{"@type":"Answer","text":"js function"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"index.js what is load?","acceptedAnswer":{"@type":"Answer","text":"the app component. Aka main component"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"index.html to be done","acceptedAnswer":{"@type":"Answer","text":"tbd"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"All component names must be...","acceptedAnswer":{"@type":"Answer","text":"capitalized, bc lowecase is seen as html elements"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"In return, variables, constants or states must be...","acceptedAnswer":{"@type":"Answer","text":"wrap around brackets {}"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"JSX con be defined as a combination of...","acceptedAnswer":{"@type":"Answer","text":"css, html and js"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is transpiling and what is babel?","acceptedAnswer":{"@type":"Answer","text":"-Babel: The React code, including JSX, is passed through Babel, a popular JavaScript transpiler. -A browser cannot understand JSX syntax. -A transpiler takes a piece of code and transforms it into some other code."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is ES6?","acceptedAnswer":{"@type":"Answer","text":"JavaScript ES6 (also known as ECMAScript 2015 or ECMAScript 6) is the newer version of JavaScript that was introduced in 2015."}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"what is a website navegation?","acceptedAnswer":{"@type":"Answer","text":"refers to the process of navigating or moving through a website to find and access its various pages, content, and features. From component to component"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"examples of navegation components?","acceptedAnswer":{"@type":"Answer","text":"navbar with icons"}},{"@context":"https://schema.org/","@type":"Question","eduQuestionType":"Flashcard","text":"How many divs render one react app?","acceptedAnswer":{"@type":"Answer","text":"entire react app is loaded inside one div and index.js. The content of that div is controlled by react."}}],"educationalAlignment":[{"@type":"AlignmentObject","alignmentType":"educationalSubject","targetName":"General Concepts"}]} </script> </body> </html>