Тёмный

Building REUSABLE SwiftUI components - Peter Friese | Swift Heroes 2023 Talk 

Swift Heroes
Подписаться 7 тыс.
Просмотров 12 тыс.
50% 1

Опубликовано:

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 19   
@chesterman18g
@chesterman18g 6 месяцев назад
very good talk, Thank You Peter!
@SwiftHeroes
@SwiftHeroes 6 месяцев назад
Glad you liked it! 🧡
@trungnguyenthanh9233
@trungnguyenthanh9233 7 месяцев назад
Nice
@phukieu4238
@phukieu4238 5 месяцев назад
A question doesn’t relate to the topic, but I saw you inject service instance in Login View, so what is responsibility of LoginViewModel? It just keep state of Login View, right? 33:08
@caldera726
@caldera726 7 месяцев назад
Great video! I'm curious, is there a particular reason for not using a viewModel? Wouldn't this result in tighter coupling of Views, potentially reducing their reusability?
@PeterFriese
@PeterFriese 7 месяцев назад
Hey @caldera726 - which part of the video are you referring to?
@olegmyatlikov
@olegmyatlikov 7 месяцев назад
Thanks for the report Peter Friese! Very useful tips. I faced the same problems when I refactored my project from UIKit to SwiftUI. I wish this report was available when I did this. The report would save me a lot of time :)
@SwiftHeroes
@SwiftHeroes 7 месяцев назад
Thanks for sharing! 👍
@tbg6nb
@tbg6nb 5 месяцев назад
19:32 I am still not getting it. What is the benefit of the entire environment stuff over using "var clearButtonHidden = true" inside the TextInputField and passing "false" two times in the init ?
@cordlc
@cordlc Месяц назад
I think your method would force a default of "true," while the environment method can have any "default" in any given scope
6 месяцев назад
Nice "input" 👏
@SwiftHeroes
@SwiftHeroes 6 месяцев назад
Thanks! 😃
@Stricken174
@Stricken174 6 месяцев назад
i dont see any benefits of extract to functions, except when where is a switch. Extracted Text with modifiers doesnt make sense because its the same view with the same specs but with more lines of code.
@SwiftHeroes
@SwiftHeroes 6 месяцев назад
Interesting observation, we asked peter to reply to you 😉
@PeterFriese
@PeterFriese 6 месяцев назад
Keep in mind this is mostly to demonstrate the technique, so the example is deliberately simple. There are many cases where this makes sense and will make your code more maintainable.
@Stricken174
@Stricken174 6 месяцев назад
​@@PeterFriese acceptable) Don't think that I'm underestimate you) Common situation when extracting subviews is extracting them with all modifiers inside. So you're actually cant reuse it in the most cases. Designers nowadays can be the pain in the.. you know)
@MrKhanLabRunner
@MrKhanLabRunner 2 дня назад
Would love to see how to unit test this environment logic
@ihorzhukov
@ihorzhukov Месяц назад
What is the reason to use environments, but not init with default values for a custom TextField? Just to have the same init as an original TextField? I mean anyway you have to not just substitute one line TextField on TextInputField in this case.
@waheedafolabi6929
@waheedafolabi6929 3 месяца назад
I so much love ❤️ this. Is the code 👨‍💻 available?
Далее
Самая сложная маска…
00:32
Просмотров 962 тыс.
Actor Reentrancy in Swift explained
20:18
Просмотров 2 тыс.
Play: The Secret Weapon for iOS Devs & Designers
10:12
SwiftUI Grids - LazyVGrid, LazyHGrid, Static Grid
17:55
Chris Eidhof: Deep dive into SwiftUI - mDevCamp 2024
43:41
SwiftConf 2023 - Paul Hudson: Level up your SwiftUI
43:16