<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/5i6e826mg" -->

---
title: LazyState 1.0: Now available to everyone | daily.dev
description: LazyState, a Swift macro library from Point-Free, has graduated from beta and reached version 1.0. It solves a gap left by Apple's new @State macro: while...
canonical: https://daily.dev/posts/5i6e826mg
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: LazyState 1.0: Now available to everyone | daily.dev
og:description: LazyState, a Swift macro library from Point-Free, has graduated from beta and reached version 1.0. It solves a gap left by Apple's new @State macro: while...
og:url: https://daily.dev/posts/5i6e826mg
og:image: https://api.daily.dev/og/posts/5I6E826Mg.png
og:image:alt: Post cover image
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.

# LazyState 1.0: Now available to everyone

**[iOS Developers](https://daily.dev/sources/ios_dev)** · [@divyesh_vekariya](https://daily.dev/divyesh_vekariya) · 22 upvotes · 3 comments

## Summary

LazyState, a Swift macro library from Point-Free, has graduated from beta and reached version 1.0. It solves a gap left by Apple's new @State macro: while Apple's macro fixed eager initialization for inline, static default values, it did not address state that must be dynamically constructed from data passed in by a parent view. LazyState provides a @LazyState property wrapper that lazily creates such state exactly once per view identity, avoiding the common workaround of making state optional and initializing it in onAppear. The library builds on the same underlying mechanism Apple's own @State macro uses internally, available since iOS 17, and is installable as a Swift package at version 1.0.0.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.pointfree.co/blog/posts/228-lazystate-1-0-now-available-to-everyone>

## Community discussion

Top comments from developers on daily.dev.

**@ristotoldsep** · 1 upvotes

> Nice fix. optional state + onAppear always felt like paying interest on a workaround.

**@ahmetozel** · 1 upvotes

> The "once per view identity" guarantee is the important distinction in the region-initialized search example. It removes repeated construction, but a later parent region value should not be assumed to reconstruct the existing completer while that identity remains alive.
>
> I would show that transition explicitly: initialize with one region, update the parent input, then demonstrate the intended update method or an intentional identity change. Both behaviors can be valid, but choosing between updating the same model and starting a new one affects cached results and in-flight searches. That...

## Similar posts on daily.dev

- [Beta Preview: LazyState](https://daily.dev/posts/beta-preview-lazystate-ctfpb9idn) · Point-Free Pointers · 0 upvotes · 0 comments
- [Our WWDC 26 series is now free](https://daily.dev/posts/our-wwdc-26-series-is-now-free-qwrs9qamx) · Point-Free Pointers · 0 upvotes · 0 comments
- [Who Told The View To Update?](https://daily.dev/posts/who-told-the-view-to-update--xvxtydysb) · Medium · 0 upvotes · 0 comments

---

Tags: [#ios](https://daily.dev/tags/ios), [#swift](https://daily.dev/tags/swift), [#swiftui](https://daily.dev/tags/swiftui)

[View this post on daily.dev](https://daily.dev/posts/5i6e826mg)

```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":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/5i6e826mg","headline":"LazyState 1.0: Now available to everyone","text":"Shared: LazyState 1.0: Now available to everyone","url":"https://daily.dev/posts/5i6e826mg","datePublished":"2026-10-15T04:16:21.859Z","dateModified":"2026-10-15T04:16:21.863Z","author":{"@type":"Person","name":"Divyesh Vekariya","url":"https://daily.dev/divyesh_vekariya","image":"https://media.daily.dev/image/upload/s--RDCl1xsD--/f_auto/v1728905544/avatars/avatar_WXcnVdXbQljWuHJCBcViw","description":"Senior iOS Developer, Tech Content Writer, Learner, Tech enthusiast and SwiftUI Addicted.","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":48070}},"image":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":22},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":3}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/q0wI3l6dM"},"comment":[{"@type":"Comment","text":"Nice fix. optional state + onAppear always felt like paying interest on a workaround.","datePublished":"2026-10-27T13:43:10.312Z","url":"https://daily.dev/posts/5I6E826Mg#c-nFiiJ5BLx","author":{"@type":"Person","name":"Risto Tõldsep","url":"https://daily.dev/ristotoldsep","image":"https://lh3.googleusercontent.com/a/ACg8ocLDWc6mZn0JwNmXXw6WY0L_HJ6pegzRttooC5VgtXESHSj3MNYx=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"The “once per view identity” guarantee is the important distinction in the region-initialized search example. It removes repeated construction, but a later parent region value should not be assumed to reconstruct the existing completer while that identity remains alive.\nI would show that transition explicitly: initialize with one region, update the parent input, then demonstrate the intended update method or an intentional identity change. Both behaviors can be valid, but choosing between updating the same model and starting a new one affects cached results and in-flight searches. That example would complement the construction guarantee with a clear input-update contract.","datePublished":"2026-10-20T09:07:28.291Z","url":"https://daily.dev/posts/5I6E826Mg#c-eyvLFsoA4","author":{"@type":"Person","name":"Ahmet Özel","url":"https://daily.dev/ahmetozel","image":"https://avatars.githubusercontent.com/u/70992231?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/ios_dev","name":"iOS Developers"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"iOS Developers","item":"https://daily.dev/squads/ios_dev"},{"@type":"ListItem","position":3,"name":"LazyState 1.0: Now available to everyone"}]}
```

