brainlid
Restore LiveView State on Startup
You are storing some Phoenix LiveView state in the browser. You want to retrieve that saved state as early as possible to improve the user experience.
The approach we used earlier waits for the LiveView to request the client to send the data. In your situation, you know you want the data, so why wait around to be asked for it? Can you have it automatically pushed from the client without being requested? Can you do it in a way that is reusable for other pages and other LiveViews and not just this one page?
This recipe improves the design and even makes it work for multiple LiveViews in the same application!
Popular Frontend topics
Stork Turns One: Building a search tool for static sites with Rust and WebAssembly • jameslittle.me.
Stork, my web search side project, ...
New
clickbait isn’t it? But this was Brock’s immediate reaction when we saw (and I recommend you read this first):
Full Third-Party Cookie ...
New
This guide is intended to cover everything you need to know about creating, manipulating and comparing strings in JavaScript.
Extra tips...
New
;; This is an animated & interactive guide to
;; building a game in ClojureScript, because
;; I find the design patterns very intere...
New
What is TCO?
Tail-call optimization (TCO) is a very neat trick that the Elm compiler does to make recursive functions a lot more performa...
New
Mine is Firebase because it is easy to learn and fast .
New
I love videos like this and it follows the same theme as @jaeyson’s thread here - I reckon the @ElixirCasts crew should consider experime...
New
I first got into web design/development in the late 90s, and only as I type this sentence do I realize how long ago that was.
And boy, i...
New
I can’t remember who was asking about CSS tuts now… but these just showed up on my YouTube feed and look pretty good/up to date :023:
New
Why in 2021 would you bother making a website without js?
While researching this post I found two really great sources of information. S...
New
Other popular topics
Write Elixir tests that you can be proud of. Dive into Elixir’s test philosophy and gain mastery over the terminology and concepts that u...
New
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
New
Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
New
Use WebRTC to build web applications that stream media and data in real time directly from one user to another, all in the browser.
...
New
If you’re getting errors like this:
psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New
Open-source implementation of the classic GTA engine now running directly in your browser. Experience the reVC technology demo on DOS.Zon...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /emacs
- /haskell
- /typescript
- /svelte
- /onivim
- /kotlin
- /c-plus-plus
- /crystal
- /tailwind
- /react
- /gleam
- /ocaml
- /flutter
- /vscode
- /elm
- /ash
- /html
- /deepseek
- /opensuse
- /zig
- /centos
- /php
- /scala
- /react-native
- /lisp
- /sublime-text
- /textmate
- /nixos
- /debian
- /agda
- /deno
- /django
- /kubuntu
- /arch-linux
- /nodejs
- /ubuntu
- /spring
- /revery
- /manjaro
- /julia
- /diversity
- /lua
- /markdown
- /quarkus









