Questions tagged [state]

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

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

More information is available on Wikipedia.

9107 questions
19
votes
6 answers

Jetpack Compose State: Modify class property

The below two examples simply add an 'a' to a given default value. The compose_version used is 1.0.0-alpha03 which is the latest as of today (to my knowledge). This example is most similar to most examples I've found during my research. Example…
19
votes
2 answers

Access props sent to components along with Redux state data

Normally you can access props sent by parent to child on child component. But when redux is used on child components the props sent by parent is lost with use of 'connect' method which maps redux state with components props. E.g.: Declaring a…
Harshith J.V.
  • 877
  • 1
  • 8
  • 21
19
votes
4 answers

Combining multiple states in StateT

I am writing a program that runs as a daemon. To create the daemon, the user supplies a set of implementations for each of the required classes (one of them is a database) All of these classes have functions have type signatures of the form StateT…
mhwombat
  • 8,026
  • 28
  • 53
19
votes
2 answers

Scala: collecting updates/changes of immutable state

I'm currently trying to apply a more functional programming style to a project involving low-level (LWJGL-based) GUI development. Obviously, in such a case it is necessary to carry around a lot of state, which is mutable in the current version. My…
bluenote10
  • 23,414
  • 14
  • 122
  • 178
18
votes
5 answers

How to pass multiple states through react context api

I'm creating a react game app and I want to pass state across multiple components. For that purpose I'm trying the react context api for the first time. So this is my GameContext.js import React, { useState, createContext } from 'react'; const…
anoop chandran
  • 1,460
  • 5
  • 23
  • 42
18
votes
2 answers

Svelte.js - How to rerender child components with new props?

I am working on creating a multi-step form using Svelte.js but I've run into an issue rendering each form page with unique props. Here is a simple demo to show you what I mean: // App.svelte