Live data from Hacker News

What Are Signals?

signia.tldraw.dev

61–63 of 63 posts

Re: What Are Signals?

#61

Earlier quoted context omitted.

> Compare that to the global state everywhere of signals/reactive/observables-based approaches like MobX or RxJS. What are you on about? Redux is literally about global state everywhere. But with three to four layers of abstractions between. You define your state globally. Then use hooks to fetch data from that global state, and then "dispatch" aka call actions on that global state. If something else somewhere else u…

Solid is basically using the same Flux architecture that Redux and Vuex is using then, with stores and actions. It's just more hidden away than in Redux which is more explicit. Yes, I do want to explicitly see what my data store looks like and in Redux I'm able to. That I have to create slices (which are automatically mapped to TypeScript by the way) is fine with me, it's only a few lines more than in your Solid exam…

[dead]

Re: What Are Signals?

#62

Earlier quoted context omitted.

useEffect, useContext, and usSyncExternalStore are no longer about "local only". And you never use only local state. You advocate for Redux in a different comment which is literally a global state where you are going to have something suddenly change somewhere from the point of view of a component.

You are misunderstanding me. I never said to use only local state with no global state at all. My point is that signals automatically make all state global because you can reference what should be a local value in a component, in another component entirely which is not at all connected to the initial component either in a parent or a child relationship. In other words, you are making a graph, not a tree. For Redux, a…

[dead]

Re: What Are Signals?

#63
post #22

I don't really understand why people like signals again. I used a signals-like reactive programming model in VueJS a while ago and hated that you could never be sure exactly where things were being changed. Thankfully it seems that the React creators and maintainers are not hopping on the signals train and are instead adamant about unidirectional dataflow with explicit mapping of state to UI, which, as has been the r…

Elm managed to move away from signals back in 2016 (controversial at the time, but IMO a great move). https://elm-lang.org/news/farewell-to-frp

So sad Elm is essentially dead.
Post reply on HN