Published new Electric snapshot, no known breaking changes • fixed a regression where dom/On can throw "uninitialized flow"
Hello I’m not sure if it’s related, but I’m getting “uninitialized flow” errors today 🤔
(e/defn Node [node]
(e/client
(assoc node :question
#_(dom/text (:question node)) ;; Works as expected
#_(Input* (:question node)) ;; Error: Uninitialized flow.
#_(Input (:question node)) ;; Error: Uninitialized flow.
(dom/input ;; Error: Uninitialized flow.
(:value (dom/props
{:value
(dom/On "change"
#(-> % .-target .-value)
(:question node))})))
)))
(reset! !graph (Node (e/watch !graph)))That's concerning, are you able to provide a minimal repro?
Let me try :^)
ty
thanks
i shared your minimal repro with the team and they accept the issue, im a little fuzzy on the details, will share more tomorrow
In your minimal repro, the initial value of node is (e/amb) i.e. Pending (the client atom is not even constructed yet, because the initial value is on the server and must transfer). This is the root cause of the issue, and you can use this knowledge to construct a workaround. However, it shouldn't crash, we are considering how to change dom/On to prevent this crash
Thanks!