This module delves into state management strategies in SwiftUI,
empowering students to handle application state effectively and
maintain data consistency across the user interface.
By René Cacheaux.
This lesson teaches the basics of how SwiftUI views keep track of state. You’ll learn about the @State keyword, which is a way for parts of your app to keep track of local information, like what a user types in a form. By the end of this lesson, you’ll be able to make your app remember and react to what users do
Lesson 2 takes you further into making your app interactive. In this lesson, you’ll learn about @Binding, a key tool for connecting different parts of your app. @Binding enables you to have one part of your app show or change information based on what’s happening in another part. Using our budget tracker app as an example, you’ll see how to make different sections of your app work together smoothly. By the end, you’ll be able to build an app that’s not just interactive, but well-connected and responsive.
In this lesson, you’ll learn about the @Observable macro, a tool that helps different views in your app share and update information together. We’ll use our budget tracker app to show how @Observable keeps everything in sync, like updating the total income and expenses as you add new entries. By the end of this lesson, you’ll be able to share editable state across different views in your app, keeping the entire app up-to-date.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.