gonzalezreal / swift-markdown-ui

Display and customize Markdown text in SwiftUI
MIT License
2.25k stars 268 forks source link

Use `@State` and `onReceive` to load the markdown images #83

Closed gonzalezreal closed 2 years ago

gonzalezreal commented 2 years ago

This PR fixes all the view update issues related to iOS 15 and onAppear (see #78 and possibly #77) by replacing the @ObservedObject that renders the markdown and loads its images with a publisher that sends view state changes and sinks them to a @State variable via the onReceive view modifier.