react

"mulling over state management stuff"
Aron 2020-05-12T00:18:56.082200Z

It's a matter of support, mostly

orestis 2020-05-12T01:43:42.082700Z

Better REPL in what sense?

lilactown 2020-05-12T01:46:01.083400Z

I’d like to be able to get the live state of a rendered component in my REPL, change it and trigger a re-render

lilactown 2020-05-12T01:46:32.083900Z

evaluate an element in my REPL and see it rendered in a popup

lilactown 2020-05-12T01:47:20.084900Z

or maybe many other things! I dont know 😛 I just want to be able to do more things with my editor + repl rather than have to live in editor + repl + app + chrome devtools

lilactown 2020-05-12T01:49:16.085800Z

I have an experiment I did that got the currently rendered tree of some React root on the page, and turned it into a seq using tree-seq

lilactown 2020-05-12T01:49:53.086600Z

then I could filter/map/etc. on it. with a bit of elbow grease I was able to get the currently rendered state of a specific element on the page and change it

lilactown 2020-05-12T01:50:30.087Z

it seems like a good opportunity for a library to fill in the gaps

lilactown 2020-05-12T01:52:25.088Z

it relies on a lot of internals of whatever version of React you’re using so I don’t think I would include it in helix, and I haven’t had time to really think about any use cases beyond the two I talked about

lilactown 2020-05-12T01:52:29.088200Z

but I bet there’s a lot more

Aron 2020-05-12T01:56:48.088500Z

sounds like something that needs a custom rendedrer

Aron 2020-05-12T01:57:28.089Z

like enzyme or other test renderers?

lilactown 2020-05-12T01:58:16.089700Z

the two things I've written above shouldn't need a custom renderer at all. just needs to hook into the right things in React internally

Aron 2020-05-12T01:58:46.089900Z

I believe you ; )

Aron 2020-05-12T02:51:11.090200Z

https://github.com/pubkey/rxdb when rxjs is not enough ...