Are {:pre [...]} checks supported in Electric v3 fn's, and if yes, where do they run given that they are not sited?
No, :pre and :post conditions are not supported by Electric v3 fn yet. Neither assert.
Gotcha. In that case: the Electric compiler does not throw if you specify {:pre [...]} although some users used to clj functions may expect it to work, even though it is not supported.
You're right, we should certainly improve DX in that regard. Thank you for your feedback 👍
Given a recursive Electric fn that renders a tree picker, if you pass (e/server root-node-id) as the root node value ID at the top-level (root) call-site, does Electric care that subsequent recursive child ID renders are sited on the client, i.e. (e/client some-child-id)? I assume Electric won't care, but curious coz I'm debugging a perf. issue at the moment and trying to get to the bottom of it.
Electric fn calls are site-neutral. Only host interop is sited. Transfers should only happen at your recursive tree leaves. See the "no request waterfall" section of Electric documentation.
Beware of rest arguments (`& args`) and destructuring though: they desugar to host interop (as in plain clojure):
• Rest args builds a list value
• Destructuring calls nth or get
Both forces the value site.
control flow is also sited e.g. if