365体育足球滚球比分

Questions tagged [state]

365体育足球滚球比分 The contents of memory locations, at any given point in the program's execution, is called the program's state.

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

Websocket, State Management and Null Values on Updates

I have a simple component. Which consumes an API. That API is {items: [{..}]), statuses: {..}}. Doesn't matter what is inside the items and statuses. Data are coming as they should. But there is one ...
0
votes
0answers
6 views

Changing my working environment when changing the task I am working on (windows,linux,mac)

This is not a code question but a more general one, I have been trying to find this on google searches but perhaps I am not using the right words, but considering that great minds are in here maybe ...
1
vote
1answer
52 views

Why use prevState in React setState function?

Please tell me what different using prevState and using Array.filter. // components is an array that has object {key: string, item: {}} const defaultValue = [ { key: 'a', item: {}, }, { ...
1
vote
0answers
34 views

Subtracting state values - react

I create a calculator in react. It stores variable values in the application state. Addition and multiplication works correctly, unfortunately there are errors when subtracting, e.g. 9 - 1 = -8. Why ...
0
votes
1answer
17 views

Ant Design for React : Show/Hide particular column

I need a bit of help here, In an Ant Design table, I need to hide/show a particular column of a table depending on a state value. In the given sandbox link, I need to hide the surname column whenever ...
0
votes
1answer
20 views

Change background-color of component depending on where i call it

I've got a problem I can't seem to solve. I use a component several times in my app but I'd like the background to be different. I've declared an empty state for the moment, which I'm using in ...
0
votes
2answers
21 views

Confused about the variable scope in REACT?

I define a const before return( but when I try to render it, get error its undefined. I am struggling with the concepts of REACT. Any constants or vars defined before RETURN are not available for ...
0
votes
1answer
29 views

State array not populating in React

I am trying to do a simple operation to create an array in React and set it equal to a state object. Anyone know why state.countState is being populated with "null" for each array element? I ...
0
votes
2answers
26 views

state in my react app get set to undefined

Below is my code for a personal project where i can keep track of my monthly subscriptions, if i have to add a subscription i just have a add an object to an existing array. however for testing ...
0
votes
1answer
33 views

How to binding a optional type to non-optional type

Xcode says Cannot convert value of type 'Binding<String?>' to expected argument type 'Binding<String>' struct CustomContentView: View { @State var queryItem = URLQueryItem.init(name: &...
0
votes
0answers
28 views

Best practices in 2020 Angular store manager vs rxjs [closed]

I have a question is RxJS great tool to use in Angular in 2020. For example if we had enterprise web application, is it still relevant? As I see we could manage custom state service with RxJS rules, ...
0
votes
2answers
39 views

setState not updating even after callback. Calling this.state.loop in a loop does not render updated state

Overhere I'm using await and a callback to setstate to my store_result state and made it an await call. So that when I call the function depends on it it is already updated. I read many relevant posts ...
0
votes
1answer
28 views

how to save and load state of program

I have the following code.when I stop execute or close the script, it should save the current execution state in a file. and when I run the script again it should load the previous state first and ...
1
vote
1answer
37 views

Separating state dependent functions in React top component

I am learning react and I reached a problem I can't get past. On the upmost component I have a lot of functions that depend on state and that modify state. These will get passed on to children ...
0
votes
0answers
14 views

How to dynamically build react components once, but still give them access to parent state?

I'm dynamically building React children based on an outside ordering. Unfortunately, the initial build process (represented below in the .forEach is very expensive: const [amt, setAmt] = useState(0);...

15 30 50 per page
1
2 3 4 5
389