I'm fairly new to Swift and SwiftUI (and iOS development in general). I have a web app written in ReactJS and we use draftJS (Facebook opensource) to do rich text editing, which handles @mentions and #hashtags. When the keystroke listener picks up an @ or #, it looks up the mention or tag and when the user selects, it formats the result as a formatted link to the user or the tag.
This works great. However, we started iOS development and are trying to bring the two version's feature sets to parity. I'm trying to build the iOS version using SwiftUI because of the reactive nature of the framework and how it mimics a lot of the same concepts from ReactJS.
DraftJS has a complex data structure that gets serialized and stored as a JSON object OR I can save it as HTML. Or both. It's honestly way more than I need, but that's basically how to do it in React.
I don't really need rich text. What I need is mentions, hashtags.
How can I architect a solution that works for both platforms and stores state as something that both platforms can create and consume?