Posts by greguintow • 151 points
10 posts
-
0
votes1
answer22
viewsA: Error whenever I use Omit
I assume you’re running the server with ts-node-dev or the nodemon next to the ts-node or maybe sucrase, there are several options. But I imagine you are using the ts-node-dev and passing the…
-
0
votes1
answer96
viewsA: Make sure the Component is starting with the uppercase - React Native
Hello, This problem is occurring because you are trying to enter a React instead of a React-Native, which means that within this Component there is html content that is not allowed within a…
-
1
votes2
answers249
viewsA: Input component is not changing the state value
Hello, this happened because in your wrapper you stated: ... const Input: React.FC<InputProps> = ({ label }: InputProps, ...props) => { ... } The correct syntax would be: ... const Input:…
-
3
votes2
answers973
viewsA: How to export and import object array in Javascript?
Only export the Function the file where the function is located export const getNames = () => produtos.map(({ name }) => name) the file where you want to use the function import { getNames }…
-
0
votes1
answer76
viewsA: Can I add functions within the render method?
I suggest you do it this way since you’re in classes: export default class Header extends Component { componentDidMount() { } render() { return ( ... ) } } So it will perform a function as soon as…
-
0
votes1
answer366
viewsA: bcrypt.compare returning false even with correct password after certain period of time
I suggest this edition: userSchema.pre('save', async function () { if (this.isModified('password')) { this.password = await User.hash(this.password) } }) userSchema.statics.hash = function(password)…
-
2
votes1
answer199
viewsA: Reactjs and Redux state does not change
I converted to a model in React-Hooks which is much easier to understand than in the "archaic model". import React, { useEffect, useState } from 'react' import { Container, Form, Button } from…
-
1
votes1
answer64
viewsA: How to apply a css class to a child element of a component with javascript?
just need to do this: const styles = StyleSheet.create({ PDFDownloadLink : { '& a': { ... } } )} I hope I’ve helped.…
-
1
votes2
answers92
viewsA: Attribution Doubt via Destructuring - Javascript
If you did what you would like, it would try to look for a 1 position in the vector doing the destructure, but since it is in a for and already selected the position, the only way to get it right…
-
1
votes1
answer325
viewsA: How to read a JSON file to render HTML list
I believe you are accessing the wrong way recomendation you notice that you have created a json file which is an array think the correct way to get the recomendation would be so: var products =…