<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-pass-arbitrary-values-into-a-livesession-htxfkbino" -->

---
title: How to Pass Arbitrary Values Into a LiveSession | daily.dev
description: Learn how to pass arbitrary values into a LiveSession in Elixir using the &#x27;live_session&#x27; and &#x27;session&#x27; options. This allows for simple state to be passed to a...
canonical: https://daily.dev/posts/how-to-pass-arbitrary-values-into-a-livesession-htxfkbino
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Pass Arbitrary Values Into a LiveSession | daily.dev
og:description: Learn how to pass arbitrary values into a LiveSession in Elixir using the &#x27;live_session&#x27; and &#x27;session&#x27; options. This allows for simple state to be passed to a...
og:url: https://daily.dev/posts/how-to-pass-arbitrary-values-into-a-livesession-htxfkbino
og:image: https://api.daily.dev/og/posts/HTXfKBiNO.png
og:image:alt: How to Pass Arbitrary Values Into a LiveSession
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Pass Arbitrary Values Into a LiveSession

**[DockYard](https://daily.dev/sources/dockyard)** · 1 min read · 0 upvotes · 0 comments

## Summary

Learn how to pass arbitrary values into a LiveSession in Elixir using the 'live_session' and 'session' options. This allows for simple state to be passed to a group of LiveViews without much complexity.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://dockyard.com/blog/2024/04/11/how-to-pass-arbitraty-values-into-a-livesession>

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#elixir](https://daily.dev/tags/elixir), [#liveview](https://daily.dev/tags/liveview)

[View this post on daily.dev](https://daily.dev/posts/how-to-pass-arbitrary-values-into-a-livesession-htxfkbino)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Pass Arbitrary Values Into a LiveSession","url":"https://daily.dev/posts/how-to-pass-arbitrary-values-into-a-livesession-htxfkbino","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-pass-arbitrary-values-into-a-livesession-htxfkbino"},"datePublished":"2024-04-11T21:31:28.830Z","dateModified":"2024-05-09T08:29:02.242Z","description":"Learn how to pass arbitrary values into a LiveSession in Elixir using the 'live_session' and 'session' options. This allows for simple state to be passed to a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2665eaf4b3679bd36f148af8c1a03c69?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2665eaf4b3679bd36f148af8c1a03c69?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"DockYard","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"DockYard","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/0a287d5bf0264b359ea2e5dd2c7635aa","url":"https://daily.dev/sources/dockyard"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-pass-arbitrary-values-into-a-livesession-htxfkbino","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,elixir,liveview","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"DockYard","item":"https://daily.dev/sources/dockyard"},{"@type":"ListItem","position":3,"name":"How to Pass Arbitrary Values Into a LiveSession"}]}
```

