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
This is a really good article explaining what WebAssembly is and how to get started with it - well worth a read!
Pinning it for our /was...
New
Vue vs React: Best Choice for Startups.
“I just have one question for you: Why Vue? I hope you’re not rolling your eyes thinking - “ah n...
New
The No-Framework Framework: JavaScript Without React Part I.
How I improved my programming speed by replacing React with plain JavaScrip...
New
In this article, I will discuss my journey from being an anti-TypeScript developer to a developer who now couldn’t think of going back to...
New
The TypeScript type system is immensely powerful, and while the language itself is, of course, Turing complete, so is the type system its...
New
VanillaJS v. jQuery v. hyperscript
Below are comparisons of how to implement various common UI patterns in vanilla javascript, jQuery an...
New
Let’s build a fully functioning and settable “analog” clock with CSS custom properties and the calc() function. Then we’ll convert it int...
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
What is surprising is that a 14kB page can load much faster than a 15kBpage — maybe 612ms faster — while the difference between a 15kB an...
New
Learn to customize the Error HTML module in Phoenix LiveView, while enhancing the UX and retaining the typed URLs on branded 404 pages.
...
New
Other popular topics
Hello Devtalk World!
Please let us know a little about who you are and where you’re from :nerd_face:
New
Instantly view the changes you make to an app with stateful hot reload, and define a declarative UI in the same language as the app logic...
New
From finance to artificial intelligence, genetic algorithms are a powerful tool with a wide array of applications. But you don't need an ...
New
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New
Tailwind CSS is an exciting new CSS framework that allows you to design your site by composing simple utility classes to create complex e...
New
Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New
Programming Ruby is the most complete book on Ruby, covering both the language itself and the standard library as well as commonly used t...
New
Big O Notation can make your code faster by orders of magnitude. Get the hands-on info you need to master data structures and algorithms ...
New
Will Swifties’ war on AI fakes spark a deepfake porn reckoning?
New
Overarching tutorial for Python beginner and intermediate developers that teaches web development with the Flask framework.
Miguel Gr...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /java
- /clojure
- /typescript
- /emacs
- /haskell
- /svelte
- /onivim
- /kotlin
- /react
- /c-plus-plus
- /crystal
- /tailwind
- /gleam
- /ocaml
- /elm
- /vscode
- /flutter
- /html
- /ash
- /deepseek
- /zig
- /opensuse
- /php
- /centos
- /react-native
- /scala
- /lisp
- /textmate
- /sublime-text
- /nixos
- /debian
- /agda
- /deno
- /django
- /kubuntu
- /nodejs
- /arch-linux
- /ubuntu
- /spring
- /revery
- /manjaro
- /julia
- /diversity
- /lua
- /quarkus
- /laravel









