Skip to content

Update DynamicUIModifier in a way that AnyView is not required anymore. #20

@0xWDG

Description

@0xWDG

deally, this function would use @ViewBuilder to avoid type erasure with AnyView, which would improve type safety and allow for more natural SwiftUI composition.
However, applying modifiers dynamically based on a dictionary of keys and values currently requires type erasure, since @ViewBuilder expects a static view hierarchy.

https://github.com/0xWDG/DynamicUI/blob/main/Sources/DynamicUI/Extensions/View.modifiers.swift#L17-L112

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions