Questions tagged [state]
The contents of memory locations, at any given point in the program's execution, is called the program's state.
state
9,443
questions
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] = ...
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 ...
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 ...
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 ...
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, ...
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 ...
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 &&...
-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 ...
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 ...
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) ...
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 ...
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 ...
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, ...
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 {
...
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 ...