Category "state"

Reaction not being triggered by nested observables

I have a observable class with nested observable properites: class TodoItem { @observable name: string = ""; @observable completed: boolean = false; @act

React Click Counter: Updating State of just one element

This should be pretty simple, but I can't figure out how to do it. I have a component with multiple buttons, each with a "count" value, set with state. When a

How can I save the state of a component after navigating to another component in Angular 8

I have 2 components: HomeComponent and CityComponent. They do not have any relationship. After navigating back to the HomeComponent, the state of the CityCompon

How to update state ( initial State ) objects in reducer when using immer?

If have a state of objects payload: export const initialState = { payload: { firstName: 'Mick', lastName: 'Andri', phoneNumber: '

How to use RefreshIndicator to update FutureBuilder state?

I am using FutureBuilder to show the data loaded from server. I want to show the loading state only once when the app starts, that is why I am calling the API f

Should you use "extends" or "with" keyword for ChangeNotifier? - Flutter

I have seen several examples of a model extending ChangeNotifier using both 'extends' and 'with' keywords. I am not sure what the difference is. class myModel

Accessing AppState in AppDelegate with SwiftUI's new iOS 14 life cycle

I'm using SwiftUI's new app lifecycle coming in iOS 14. However, I'm stuck at how to access my AppState (single source of truth) object in the AppDelegate. I ne

SwiftUI Textfield state change stopped working with iOS 15.4.1

The following code has worked fine until iOS 15.4.1. It simply enables a button next to a textfield after the value entered is greater than 100000. It still w

Blazor Server App MVVM-Pattern: Get notifyed in parent from child component change of App-State via a serviceclass in Startup.cs

I work on a Blazor-Server-App and try to follow MVVM pattern. My problem is, that I don't understand why a parentpage is not 'auto refreshed' after a property i

Does React keep the order for state updates?

I know that React may perform state updates asynchronously and in batch for performance optimization. Therefore you can never trust the state to be updated afte

Change State whenever button is clicked back and forth in React?

So I know how to change state when the button is clicked once, but how would I change the new state back to the previous state when the button is clicked again?

ReactJs this.setState is not a function

I'm trying to change the value of a this.state.id with an <input> tag value, when I click on a <a> tag as follows: {this.state.json[1].map(i =>

React - how to pass state to another component

I'm trying to figure out how to notify another component about a state change. Let's say I have 3 components - App.jsx,Header.jsx,and SidebarPush.jsx and all I'

Ngxs - How do I chain actions?

I want to do something like this for my registration. When clicking the register button, this will be executed: this.store.dispatch(new Register(user)) .s

I'm creating and validating a dynamic form in Flutter, but when I change the page and return to the previous page I get an error. how can i solve

It works in release mode but I get an error in debug mode class UrunHizmetWidget extends StatefulWidget { int index; final state = _UrunHizmetWidgetState();

Updating an object with setState in React

Is it at all possible to update object's properties with setState? Something like: this.state = { jasper: { name: 'jasper', age: 28 }, } I have tried:

Nuxt.js vuex store not persisted

I've got some strange issues with my Nuxt.js Setup. Some States in Store arent persistent, everytime I load another view, they went back to the default value. p

Victory charts doesnt update when data changes in React

I'm using victory chart to display data from api. When i search a date through search date component , I noticed when the data changed, the chart didnt re-rende

React setState not Updating Immediately

I'm working on a todo application. This is a very simplified version of the offending code. I have a checkbox: <p><input type="checkbox" name="area"

Getting "Unreachable code no-unreachable" in ReactJS

I am new to create GET requests in React. I am trying to fetch media_id from Instagram Content when someone enters the url in the input field. The interesting t