TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Phoenix LiveView: Async Assign Pattern

146 点作者 gnutrino将近 2 年前

5 条评论

gnutrino将近 2 年前
I started using this pattern in my LiveView projects, and finally rolled it into a common module for others to use. I&#x27;ve found it really helps clean up the mount function, which can get pretty messy as your LiveViews grow over time.<p>My apologies for the terrible elixir syntax highlighting in this post. I keep putting off finding a good way to do this on Blogger.
评论 #36332761 未加载
vinnymac将近 2 年前
I haven&#x27;t written Elixir professionally the last couple of years, but I was an early user of LiveView when it was first demoed at a conference.<p>As someone who currently writes applications using React Server Components, I am interested to see how concepts like LiveView evolve over time. We are now shipping significantly more HTML than before, and a lot less Javascript, as more has been moved to the server.<p>Makes me wish LiveView was portable to every other platform I work on, rather than having to convince companies to write more Elixir (although that isn&#x27;t a bad thing).
评论 #36333026 未加载
评论 #36334766 未加载
评论 #36331820 未加载
评论 #36334078 未加载
ramchip将近 2 年前
Does this work well with tests? For instance, if you click a button in a test, do you need to do something special to ensure the async update has happened before checking assertions on the HTML contents?
评论 #36335285 未加载
tommica将近 2 年前
Looks really useful and neat especially the way it chains so fluently for parallerization
评论 #36332092 未加载
wahnfrieden将近 2 年前
Anyone doing similar with Swift given it also has server continuations?