Fork me on GitHub
#shadow-cljs
<
2023-08-03
>
Drew Verlee18:08:23

i have two tabs open in chrome each pointing to the HTTP server started by shadow. How is repl state managed in this case? Should i expect in memory state to switch as i switch tabs?

thheller19:08:09

not sure what you mean. both have their independent state, they are not linked unless you wrote something to do that yourself

thheller19:08:39

the REPL is only connected to one, usually the one first connected. you can select which one to talk to, but its always one at a time.

Drew Verlee19:08:23

How do you select between the two?

thheller19:08:59

its a bit manual since no editor has support for it

👀 2
thheller19:08:20

from the CLJ REPL (shadow.cljs.devtools.api/repl :the-build-id {:runtime-id 123}) where 123 is the id of the runtime

thheller19:08:41

it is logged in the browser console. the shadow-cljs - #4 ready! message

thheller19:08:05

or http://localhost:9630/runtimes lists them too, but kinda hard to tell them apart if both are chrome

Drew Verlee04:08:05

thanks. I didn't end up needed to do this to solve my issue, but it helps to know it's possible 🙂