helix

https://github.com/Lokeh/helix
Aron 2020-07-13T18:02:51.314700Z

have you ever used React.useDebugValue with helix?

lilactown 2020-07-13T18:06:14.314900Z

I have not

lilactown 2020-07-13T18:07:36.315200Z

is there a specific question you have about it?

Aron 2020-07-13T18:11:31.315500Z

no, just curious

Aron 2020-07-13T18:14:13.318600Z

I am this really shitty position that I didn't open my mouth in time and let myself slowly get somewhere where it's extremely hard to debug my app. Basically, I was saying we need some kind of proper state management thing, at least a central useReducer or something, so that it's easier to debug/maintain the app. My boss said that no, just do simple hooks because this is a simple thing, we don't need to centralize the state, just do it as I go. Well, I was done earlier, in this he was probably right, but now I am having incredibly frustrating bugs where on some interaction there are remote calls and in their handler I clear some data that I should keep, but I don't even know which call hook is that.

Aron 2020-07-13T18:14:55.319400Z

If I had been more adamant this would've been avoidable, but now I am looking desperately for anything that helps me find where the state is being cleared.

Aron 2020-07-13T18:15:18.319700Z

So maybe this useDebugValue will, I am not sure

dominicm 2020-07-13T18:30:52.324Z

I've had a few mishaps like this with local state. I've made a conscious effort to hoist up state and write my components to fire semantic callbacks ("onChangeXXX" instead of direct state access). It makes it much easier to coordinate state, but also reduce the number of useEffect dramatically.

Aron 2020-07-13T18:40:03.325Z

Yeah, I know half a dozen obvious ways to avoid this, but I was probably too lazy at the time to argue. Not again. If I see something as too complicated, I will deal with it as such, no matter what bosses say.

Aron 2020-07-13T18:40:34.325600Z

It's just that at the time this seemed like a minor matter. Not so now when I just want to get over it but I can't.