Posts by Leonardo Leite • 182 points
19 posts
-
-1
votes1
answer27
viewsA: Formattednumber of the Intl-React swap semicolon
Friend try using Javascript’s property. toLocaleString() Below is an explanation of how to use and what to do.…
-
1
votes2
answers51
viewsA: Error trying to save in BD
Friend, try to do this using async/await only. What you did was use the pormisses along with async/await, which is wrong. In addition to not starting the instance of Axios. const baseUrl =…
-
0
votes2
answers55
viewsA: How to use Reactdom to create Buttons through conditions
Friend in these cases can use ternary operators as per the code below, leaving the cleaner and clear. import React, {useState} from 'react'; import ReactDOM from 'react-dom'; import {useHistory}…
-
0
votes2
answers505
viewsA: How to increment a state object with another object in React Native?
Friend in your case, you can use the structure that came with ES6 in Javascript, as follows: state = { loading: false, data: [], error: null, page: 1, } makeRemoteRequest = (page) =>{ const url =…
-
0
votes1
answer31
viewsA: setState outside the constructor
Friend the setInterval() function works in the constructor due to the same being rendered when creating the component, thus calling the function. The way you passed setInterval out of render() the…
react-nativeanswered Leonardo Leite 182 -
2
votes1
answer1703
viewsA: Custom source React Native
Friend to insert custom fonts/icons is required to create a file called "React-Native.config.js" in the project root by passing the following code: RN 6.0+ module.exports = { project: { ios: {},…
-
-1
votes1
answer41
viewsA: LOGIN ROUTE ERROR
Friend, this route would be a GET ? if yes, you should pass the parameter by the route or by query params and not in the request body. Only POST and PUT has body. The GET and DELETE has parameters…
-
0
votes1
answer229
viewsA: Use more than one function in the Get Method route with Node.js
Good friend , I’ll give you some tips , I hope it helps regarding the verbosity of the code, because it is a query in the same table but with different conditions, it may be that a raw with a SELECT…
-
1
votes1
answer1296
viewsA: How to switch from one page to another in React Native
Felipe, for navigation use lib React-navigation V4 So that you can navigate between screens, after configuring the routes take from within this.props the navigation property and use:…
-
0
votes1
answer246
viewsA: Typescript - Representing the rest of a component’s parameters in an Interface
Friend try to pass the other properties you do not want to declare in the interface outside the structure, like this: interface InputProps { append: string; } const Input: React.FC<InputProps>…
-
0
votes1
answer200
viewsA: I want to put a different style on my first React-Native Flatlist item
In the parent component where the Flatlist is, Voce could pick up the index of the item. Ex: renderItem={(item, index) => <Card bgColor={ index === 0 ? '#COREMHEXA' : #'COREMHEXA' } />} Ai…
react-nativeanswered Leonardo Leite 182 -
0
votes2
answers790
viewsA: Error in the React-Native run-android command
Friend, use this step by step to install the development environment on your machine: https://docs.rocketseat.dev/ambiente-react-native/introducao…
react-nativeanswered Leonardo Leite 182 -
1
votes1
answer126
viewsA: React-Activate Invariant Violation:_default(...)
Hello ! I could take a print or inform me the structure of folders using, I believe your problem is related to this post Exactly in this answer: The problem is that the registered application name…
-
0
votes2
answers130
viewsA: Problem with setState in React Native: "Can’t call 'setState' on a Component that is not yet Mounted."
Try using this: this.setState(this.state);
-
0
votes1
answer116
viewsA: Error while running a React-Native and firebase project
Friend make the following change in your code: // import firebase from 'firebase'; import firebase from '@firebase/app' Or install firebase version 5.0.3, or more current (recommend using firebase…
-
3
votes1
answer92
viewsA: React Native Compile Update
Friend try to spin this commando: react-native start --reset-cache
react-nativeanswered Leonardo Leite 182 -
1
votes2
answers549
viewsA: React-Native code error
Friend there are some mistakes in your code. 1 - You are typing Login without the title tag on the Button 2 - This importing twice the React. Follows the correction, checks if it works as expected:…
react-nativeanswered Leonardo Leite 182 -
0
votes2
answers201
viewsA: Cameraroll React-Native
Try this: style={Styles.image_item} Inves of: style={[ Styles.image_item ]}
-
2
votes2
answers852
viewsA: Error running mobile app
Linux and macos Run the following commands on the terminal, or save them inside one of these existing files on your system: ~/. bash_profile , ~/. profile or ~/. zshrc export…