
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
New

Ashley Williams Discusses the Future of WebAssembly at the WebAssembly Summit .
Williams commented on the results of a Twitter poll sh...
New

WebAssembly has been one of the trendiest intermediate representations since a while.
However, its definition of safety means preventing...
New

Welcome to the 5th edition of the JavaScript Rising Stars, our annual round-up of the JavaScript landscape!
The concept is the same as b...
New

The Elm Architecture is one of the great innovations Elm brought to the software industry. But one of the questions that often comes up i...
New

Hey! We’re getting really close to releasing React + Vue support for Tailwind UI, so I thought it would be interesting to share some of t...
New

In this article, we will look at the fascinating evolution of graphics in browsers from the prehistoric days of the early browsers. We wi...
New

On your LiveView page, you are using a custom component. You want to be able to pass HTML attributes into the component, but the componen...
New

Recently Tom MacWright has written a few posts on Single Page Applications and their discontents:
Second-guessing the modern web
If not...
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

What chair do you have while working… and why?
Is there a ‘best’ type of chair or working position for developers?
New

I’m thinking of buying a monitor that I can rotate to use as a vertical monitor?
Also, I want to know if someone is using it for program...
New

On modern versions of macOS, you simply can’t power on your computer, launch a text editor or eBook reader, and write or read, without a ...
New

“Finding the Boundaries” Hero’s Journey with Noel Rappin @noelrappin
Even when you’re ultimately right about what the future ho...
New

If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New

Think Again 50% Off Sale »
The theme of this sale is new perspectives on familiar topics.
Enter coupon code ThinkAgain2021 at checkout t...
New

Author Spotlight:
David Bryant Copeland
@davetron5000
We’re so happy to bring you another Author Spotlight, a series where we sit dow...
New

I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New

Author Spotlight:
Peter Ullrich
@PJUllrich
Data is at the core of every business, but it is useless if nobody can access and analyze ...
New

Will Swifties’ war on AI fakes spark a deepfake porn reckoning?
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /ash
- /vscode
- /opensuse
- /centos
- /php
- /deepseek
- /zig
- /html
- /scala
- /debian
- /nixos
- /lisp
- /agda
- /textmate
- /react-native
- /sublime-text
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /django
- /spring
- /manjaro
- /diversity
- /lua
- /nodejs
- /julia
- /c
- /slackware
- /neovim