Closed osddeitf closed 1 year ago
Hmm, this might be related to adding Signal.prototype.toJSON
, mind trying something like the following in the server-entrypoint of your application:
import { Signal } from '@preact/signals-core'
Signal.prototype.toJSON = undefined
EDIT: it looks like this got addressed in https://github.com/denoland/fresh/pull/1348
@JoviDeCroock I added the code you said, and it worked! But for your information, I'm using Fresh v1.3.0 which is just released yesterday, the PR was merged a month ago.
@osddeitf I know that that PR got merged a month ago, I was mainly hinting at that maybe the detection there is running into an issue. The issue might be more appropriate on their repo 😅
If you think so, I'll ask there
Closing in favour of https://github.com/denoland/fresh/issues/1488 because it's an issue in Fresh and not with Preact Signals.
I write my website in Fresh, recently I upgraded Fresh to v1.3, along with all the Preact dependencies, including
@preact/signals
to v1.1.5 and@preact/signals-core
to v1.3.1. Then I noticed the signals in my website is not working anymore. After trying downgrade@preact/signals
and@preact/signals-core
, I found out that@preact/signals-core
version upto v1.2.3 would work. I also noticed the data for hydrations changed too:v1.2.3
v1.3.1
As I compare the two JSON outputs, I think v1.3.x makes
requestURL
signal two different objects, while v1.2.3 make it one.