Fork me on GitHub

Hello, has anyone here used Portal on a shadow project? Any pointers on how to get things to play nice? for instance, automatically reloading portal (cljs) when reloading and so forth?


The portal.web namespace should work fine with shadow. Not sure what automatically reloading portal when reloading means :thinking_face: Can you provide more info?


Sorry I was unclear. What I meant was, for example, what is the recommended setup to maintain the portal connection working following browser runtime reloads/restarts. Perhaps this is more of a shadow question.


If you are using portal.web, the tap> s are stored as part of the browser runtime which means they disappear when you reload the web page. If you want the values to persist across page reloads, you can try the You will need to coordinate the :port , but that is easily hard coded. The main limitation is you can only tap> serializable values to a remote portal.

👍 1

@U0FMV3MDK I use this code and add it as a shadow-cljs :preload. It'll automatically set things up for you, using portals remote-api.


ah, this is great. thanks @U012ADU90SW ❤️