Posts by Thales Maia • 320 points
15 posts
- 
		-1 votes1 answer55 viewsQ: Align contents of divI have the following layout: I would like to align the images next to each other, but with the text always at the top. Is there any solution to this problem other than a resolution with position:… 
- 
		2 votes1 answer74 viewsQ: Type annotation in asynchronous functions in TypescriptI am new to Typescript and I have the following question. It is necessary to be explicit about the type of return of a request fetch? const getPeoples: () => { userId: number, id: number, title:… 
- 
		2 votes1 answer31 viewsQ: Object Null in DOM ManipulationI’m new to Typescript and I have a problem that I’ve been trying to solve for a while. I’m taking a random photo of an API and trying to insert it into an element div. However, I get the following… typescriptasked Thales Maia 320
- 
		2 votes2 answers66 viewsA: Variable Does Not Change Inside Factory FunctionI decided to make like one getter, returning the value of variable. const imgs = () => { let img = []; return { addImg: (photo) => img = [...img, photo], getImg: () => img }; }; const… javascriptanswered Thales Maia 320
- 
		1 votes2 answers66 viewsQ: Variable Does Not Change Inside Factory FunctionGood morning. I was studying a little more about Factory Function and did not understand the reason for the variable img not being altered. const imgs = () => { let img = []; return { addImg:… javascriptasked Thales Maia 320
- 
		0 votes1 answer22 viewsQ: Perform Same Operations with Different Values in the Filter MethodGood afternoon. I have the following code: const getCountries = async() => { const response = await fetch("https://coronavirus-19-api.herokuapp.com/countries"); const datas = await… javascriptasked Thales Maia 320
- 
		2 votes3 answers77 viewsQ: Function Returning Another FunctionI’m building a calculator (https://jsfiddle.net/rwt3am1L/). The result of the calculation appears on the screen when I click the equals key, after that it gives a "reset", however, this "reset" is… javascriptasked Thales Maia 320
- 
		1 votes2 answers1049 viewsQ: innerHTML at ReactGood morning. I’m getting a reply received by a API in my application React, however, such a response is a array containing string’s with elements html: 0 "<p>This Emmy winning series is a… reactasked Thales Maia 320
- 
		0 votes1 answer75 viewsQ: Cancel Fetch Using Componentwillunmount in React JSGood evening. I’m having doubts about such a life cycle method of React and I’m doing tests. One of them is to cancel a request fetch, however, I’m not getting it. The console log. appears, but the… 
- 
		1 votes2 answers2220 viewsA: Map a json to ReactI managed to solve my problem in a simple and silly way. Just remove the map and access the properties of JSON as if it were any object. {result? <div> <span key={result.cep}>… reactanswered Thales Maia 320
- 
		1 votes2 answers2220 viewsQ: Map a json to ReactHello, I’m studying React JS trying to make an application with the API of the CEP. However, I saw that the JSON of it is an object and does not have an array, therefore, I am not able to perform… reactasked Thales Maia 320
- 
		0 votes2 answers171 viewsA: News page | Picture and texo next doorYou could wrap with a div the image and the text (a div for each) and add the following CSS: div { display: flex; } img { width: 450px; //O TAMANHO QUE VOCÊ QUISER height: 200px; margin: 0; } Soon… 
- 
		1 votes2 answers352 viewsQ: Taking an element inside an objectHello, how do I get the "name" element, being that it is within "show" and the whole "show" is within "0"? (NOTE: If the nomenclature is wrong, I’m sorry, I’m beginner in JS) 0: score: 31.86105… 
- 
		1 votes1 answer125 viewsA: Carousel button does not appearYou have forgotten some lines of code. For example: "li’s" that contain data-target’s, one of the main mechanisms of Carousel. Follows the correction: <div id="carouselExampleIndicators"… 
- 
		0 votes4 answers272 viewsA: Leave image next to textBruno, all right? In this case, flexbox is the easiest way to help you with this problem. I added a div to wrap the image and the times. <div class="alinhar"> <img src="imagens/clock.PNG"…