More initializers, and updated playground application - #11
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds more initialization options for the DynamicUI struct and updates the playground application to showcase the framework across multiple platforms.
- Adds new
@Binding-based initializers for DynamicUI that provide a more SwiftUI-native approach to handling component state changes - Refactors existing views to use a new binding-based component handling mechanism instead of callback functions
- Expands the playground application to support watchOS alongside existing platforms
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Sources/DynamicUI/DynamicUI.swift | Adds new binding-based initializers and maintains legacy callback support through a bridge |
| Sources/DynamicUI/Views/*.swift | Updates all dynamic view components to use the new binding-based component assignment |
| README.md | Documents the new API with examples and adds legacy usage section |
| Playground/* | Adds watchOS target and updates existing playground to use new binding-based API |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| from: json | ||
| ) | ||
| } | ||
| self.error = nil |
There was a problem hiding this comment.
Setting error to nil should happen before the JSON parsing attempt to ensure proper error state initialization. Currently, if parsing fails, the error is set but if it succeeds, the error is cleared - this creates a dependency on the order of operations.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.