SwiftUI generic type support
The component property of the FigmaConnect type doesn't easily allow for use of generic types, you have to specify every specific combination of generic constraints for that type which can quickly get out of hand.
It would be nice to be able to pass in a String just for the name of that type without having to worry about the generic constraints and then somehow mark other types which could be contained within that type. This is useful for container types views such as a generic list item which could contain a leading, trailing and content 'slot' which could contain any other view type.
Hey @dlbuckley, thanks for the feedback. This is an area that we're actively looking into solutions for right now -- I'll discuss with the team about potential options here for how we can make this less cumbersome.
For now a solution we use internally is to use type erased types as generic parameters such as AnyView which might help to reduce the combinations of constraints that you need to sepcify.
Hey @dlbuckley, just wanted to give a quick update that the component field is going to be optional starting from v1.0.4 which should release tomorrow. We're still discussing how to handle these cases, but for now it should alleviate problems with generic since you won't need to implement this in your code connect files.
Thanks for the update @jyyang0, we will check it out!