Skip to main content

Questions tagged [state]

The contents of memory locations, at any given point in the program's execution, is called the program's state.

0 votes
1 answer
46 views

React useState variable is not updating after successful fetch request [duplicate]

import { useCallback, useEffect, useState } from "react"; const [isLoading, setIsLoading] = useState(false); const [videos, setVideos] = useState([]); const [nextToken, setNextToken] = ...
Vishal Tanna's user avatar
  • 1,275
0 votes
0 answers
41 views

Can't update a riverpod notifier when I inject a service

Introduction I'm working with riverpod for state management in my application. I simply want to update a variable when I call my notifier. The problem occurs when I inject my service into this ...
xenos92's user avatar
  • 661
0 votes
0 answers
27 views

How to Persist Bitmap Image State Across Navigation in Jetpack Compose with CameraX?

I implemented a camera feature using Jetpack Compose. Here is my current implementation: ViewModel: var originImageUri = mutableStateOf<Uri?>(null) private set View: var capturedImageUri by ...
Lession Ryu's user avatar
0 votes
0 answers
14 views

Updating persisted zustand functions breaks app when deploying

Some background: I'm building a new feature in a rather larger app. This feature should work across different pages so a state management solution is warranted. To handle such management, I've used ...
Paul Sender's user avatar
0 votes
0 answers
17 views

Update state, object with arrays

I would like to know how I could update this state: details: {id:{optionA: optionA, optionB: optionB, quantity:1 }} It would be something like this: details: [{ 1: {optionA: optionA, optionB: optionB, ...
ISMILIRDS IO's user avatar
0 votes
0 answers
32 views

bottomNavigationBar reset state bloc

When switching tabs, reset the state value of the state manager bloc. There is no update of the state when switching to stack. It is the tabs that are being updated.I have been working with flutter ...
yaroslav ravlushevich's user avatar
0 votes
1 answer
54 views

react-quilljs not rerender when state change

here is my config of quill with react-quilljs function QuillEditor({ value, setValue }) { const { quill, quillRef, Quill } = useQuill({ modules: { blotFormatter: {} }, }); if (Quill &&...
Hồ Lê's user avatar
-1 votes
1 answer
68 views

Load multiple images one time in flutter

Let's say I have 5 images and I need to show it using Image.memory. When I load them directly at the same time it always says :Invalid image while if I load only one image, that's really fine. Is ...
wahyu's user avatar
  • 2,185
0 votes
1 answer
31 views

Correct finite automata diagrams for these simple problems?

Hello I am learnign about finite automata and I want to see if these diagrams and my explanation make sense. {w ∈ Σ∗ | w contains the substring 1010} using five states There is the substring of 1010 ...
cool cat's user avatar
0 votes
0 answers
28 views

Facebook SDK returned an error: Cross-site request forgery validation failed. Required param "state" missing codeigniter 4

This error arises when the Facebook SDK detects a potential security risk during the login process. The state parameter acts as a crucial security measure to prevent Cross-Site Request Forgery (CSRF) ...
Md MaasuquE's user avatar
0 votes
1 answer
329 views

Svelte 5 reactive $state in external module (dragListener)

I am trying to refactor a dragListener into a .svelte.js module by defining the position of the dragged element as a reactive $state() variable inside +page.svelte and pass it back and forth between ...
The_Lab's user avatar
  • 45
0 votes
1 answer
67 views

How to assign a property to a variable from outside

How to assign a property milks to a variable activeMilk from outside. The instance member 'widget' can't be accessed in an initializer. Try replacing the reference to the instance member with a ...
yaroslav ravlushevich's user avatar
1 vote
1 answer
59 views

Difference between computed state and regular state?

I was told that I have been using too many states in my react project and that I should use computed state instead of using regular state but I am unable to understand what computed state really is, ...
kfcezz's user avatar
  • 33
0 votes
1 answer
46 views

React State not saving at all

In the auth and login function, the data returned is correct, but when I save it to state, it just disappears export const useAuth = () => { const [user, setUser] = useState(null); return { ...
Karlo Pervan's user avatar
1 vote
1 answer
41 views

React state variable throws error when updated using ++ prefix

I'm Fairly new to React and JS, just exploring the nitty-gritties of the lang. I'm trying to compare the difference in updating the state variable "counter", using the ++ operator( and by ...
John Kiruba's user avatar

15 30 50 per page