This video demonstrates traversing a filesystem tree from the frontend. The filesystem tree exists only on the server, and the HTML view exists only on the client. Nonetheless, we are able to unify the query/view logic into a single recursion in the simple, direct style of PHP, despite network. The Electric compiler automatically coordinates fine-grained reactive network sync.
Code note: in this video from last year, ~@
is the legacy syntax for client/server transfer, it has since been superseded by e/client
and e/server
markers.
20220621.photon.treeview.with.managed.nework.mp4
- No API, no client side database, no frontend state at all (except DOM)
- Literally all accidental complexity GONE
- Look how fast it is! It's incremental/streaming network, not request/response.
- Electric brings a higher level of expressiveness and fluency than was possible before