365体育足球滚球比分

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2
votes
2answers
33 views

Create Array and fill with index plus one in JavaScript [duplicate]

I am trying to create an Array using new Array() and filling with index + 1 but somehow, though array is creating successfully but values are not filling correctly. Code - var aa = (new Array(4))....
0
votes
0answers
34 views

ReactJs : useReducer on array of object. I need more understanding

Still new to the world of Js and React, I just made a website that works. But it bothers me the way I made it work. And I would like a bit of insight into how I could do things the better way. So here ...
0
votes
1answer
26 views

Best way to get a decent result from this Array check?

I am trying to get a decent result that I can do something with, but feel the way I am it at the moment in the 'check' function isn't actually returning other than an expression: validate = () =&...
0
votes
0answers
28 views

Why is .map Disappearing / Failing to Render when my React Property Changes

I'm having a problem related to React, the context API, and rendering with a .map function. My functional component renders from the data originally passed down through a Context Provider, but when ...
3
votes
2answers
38 views

How to render a nested array in react

I have this array of restaurants I am mapping over, so far I can return the restaurant's name in that array but we have another array inside it called ratings, I am trying to map over the rating array ...
-5
votes
0answers
41 views

Utility function for javascript

I am a new coder just fresh out of school. I have this 2 lines of code. I wanted to know if i can put a common function for both and use it in both places. const getData = (count, getString) => ...
0
votes
1answer
43 views

Javascript Add new element to array of elements if not exists

I have an array like: [{"x": 2020-06-27T08:00:00.000Z, "y": 33}, {"x": 2020-06-27T10:00:00.000Z, "y": 500}, {"x": 2020-06-27T12:00:00.000Z, "y&...
0
votes
1answer
25 views

React map the array into dropdown problem

Dialog.js const Dialog = ({label, onClose, open}) => { handleSubmit=()=>{}; return ( <Form onSubmit={handleSubmit}> {() => ( <Dialog ...
0
votes
1answer
31 views

I am having problem while using filter in react Hooks,how can i solve this issue?

I tried to use filter in react Hooks for filtering the state data fetched from the API but i get an empty array as output.How can i solve this issue?Following below is my code: let FinalData = Data....
-2
votes
0answers
22 views

Is it impossible to convert json object to .json file and upload that file? [closed]

How to convert from json object to .json file and upload file to server ? Currently, I have a api for upload file to storage and it accept only type .json file. I have a editor which return a content ...
0
votes
1answer
29 views

How to add item to an Array Type property in React Hook State Object?

Check my code below. I want to push an image file to product_images array. I tried using concat() also. But doesn't work. const INITIAL_VENDOR_DATA = { store_name: "", ...
0
votes
2answers
45 views

Get sum of price multiplied by quantity over nested arrays

I have an array of object and within object there are arrays like this [ { orderId: 123, orderStatus: 'Pending', date: 'june 13, 2020', products: [ {product: 'choco', price: 300, ...
-2
votes
0answers
18 views

How to use different delay for settimeout for each element of an array [duplicate]

Every element of the array should be displayed for some time and the time for which each element is displayed should be determined by a value in each element. let array=[{display:"a",time:10}...
0
votes
2answers
18 views

How to get array length in functional component of react

Need some help with getting the length of an array in a functional react component. When I do it in a class component it works: class SomeComponent extends Component{ render() { const someVar = ...
0
votes
4answers
30 views

How can i merge two state into single state in React Hooks?

I want to merge two state named Data and District value and create a single state named test.Since i am fetching two states value from different API.I cannot make a single state merging the data of ...

15 30 50 per page
1
2 3 4 5
237