21 questions
0
votes
0
answers
37
views
Preact radio button selection not triggering state updates in Innovation Index Toolkit
I'm working on an Innovation Index Toolkit using Preact with signals for state management. The issue I'm facing is that I cannot navigate to the next question because the radio button selections aren'...
2
votes
2
answers
469
views
How to use React Signals with arrays?
I'm trying to use Signals (@preact/signals-react) to reduce re-rendering with large data objects. In my case, I'm getting object from a network request, and tends to change frequently with live ...
0
votes
1
answer
128
views
Does @preact/signals-react work with concurrent mode of React 18?
React 18 enables concurrent mode by default -- at least in the Creact React App generated starter index.js.
However, tired with the complexity that comes with a hooks based application design, and the ...
3
votes
1
answer
91
views
Can observables support data consistency in flow graphs which rejoin?
There is a very helpful guide Signals vs. Observables at builder.io contrasting the different semantics of signals and observables. Whilst it draws the helpful distinction that signals are "pull&...
1
vote
0
answers
128
views
Is the virtual DOM in VueJS redundant?
Can anyone tell me if VueJS has fine-grained reactivity, similar to signals that use a sub-push mechanism to update directly on the actual DOM? If so, does that make the virtual DOM redundant?
I want ...
3
votes
1
answer
3k
views
Can computed signals have variable like functions?
In one of my computed signal I need to read data on a file, which is a runtime function. As I need the computed signal to run on client I need to figure out how to input variables. I try this:
import {...
0
votes
1
answer
222
views
How to update a preact signal value in a react typescript project?
I am trying out signals from @preact/signals in a ReactTS project. According to the documentation, if I would like to update a signal value, I can just do mySignal.value = "newSignal".
...
0
votes
1
answer
424
views
How to set the default value of a signal as the default value of an option element in an HTML select element?
I'm using Fresh/Preact. In an HTML select element, I want 2 things:
The value of the selected option is displayed next by
The default value of a signal is the default value of an option element
...
0
votes
1
answer
198
views
Why is my React Signals dialog not opening here?
I am trying to control a MUI dialog with a signal, but even with the <p> the value from the signal is not rendered. However, the value of the signal is changed in the console. So if I click the ...
2
votes
1
answer
1k
views
React component does not update using preact/signals-react
I am using @preact/signals-react version 2.0.0, implementing a simple counter app:
import { signal } from "@preact/signals-react";
const counter = signal(0);
function App() {
return (
...
0
votes
0
answers
193
views
Nested component re-render with preact signals
I have a activeWindows signal defined outside the JSX:
export const activeWindows = signal([
{
index: 1,
title: 'App1',
isMinimized: false,
dimensions: {
...
},
{
...
0
votes
1
answer
1k
views
Is there a way to use a preact signals effect function, in a way where I can choose what signals I want to subscribe?
I have this code.
effect(() => {
productsShoes.value = shoes.value
})
I want to, everytime only, shoes.value is changed, trigger this effect. The way that is, its re-rendering, either both ...
0
votes
1
answer
508
views
React Preact Signals array not rerendering when it changes value
I have an array signals that are being rendered in UI using map, but everytime I put a new value in it, it doesnt rerender and show in UI the new value.
import React from "react";
import { ...
0
votes
0
answers
248
views
does @preact/signals-react v2 supports class component?
in the docs of signals react integration
https://github.com/preactjs/signals/blob/main/packages/react/README.md#react-integration
it only mentioned integration with functional components
and I tried ...
0
votes
1
answer
413
views
react/next typeScript preact signals Managing global app state error
Hello i tried to use this preact global app state based on this documentation but keep getting error and this my first time using useContext i might be wrong in my config so i appriciate if anybody ...
2
votes
0
answers
228
views
React signals wont render async data
In the React component below, I want to fetch data from the server and then present it in component html, the data is arriving and i can see in the console.lo, but the component wont be rendering it.
...
4
votes
2
answers
4k
views
Difference between effect and useSignalEffect in signals-react
This question is not an issue, it is for educational purpose.
I was trying out effect and useSignalEffect from @preact/signals-react in react application.
Problem is i see effect and useSignalEffect ...
-3
votes
1
answer
1k
views
There is some issues with signals in my nextjs project
"use client";
import React, { useEffect, useState } from "react";
import { AnimatePresence, motion } from "framer-motion";
import { Route, routeCollection } from "../...
3
votes
2
answers
2k
views
@preact/signals-react not working in Vite application
I have a basic application in Vite.
Why can't I type in the input field?
import React from "react";
import { signal, computed } from "@preact/signals-react";
const name = signal&...
2
votes
0
answers
1k
views
how to use preact signals with nested state (is it compatible with immer?)
Ideally I'd like to have a state management setup which allows me to:
have an arbitrarily nested state. For example, this could be a valid entry in the state users[0].vehicle.engine.throttle
have an ...
0
votes
1
answer
596
views
How to preact signal to build a drop-down list?
This is my first to use preact/signals.
I am not sure if is it a good practice for using preact/signals.
Would you tell me how can I use the signals for building the drop-down box?
Here is my code:
...