So this is pretty incredible. The mere fact that we wanted our feature’s model to be cross platform friendly led us to improving the overall code the model. Rather than performing network requests directly in the model we have properly extracted that behavior out to a dependency that can be injected into the model.
And we now have a truly cross platform model that powers both the logic and behavior of our feature, and we are using it in a SwiftUI app, a UIKit app, and a Wasm app.
But let’s push things even further. So far we haven’t performed any navigation in the web app, but previously on iOS we presented the number fact in an alert and sheet in order to demonstrate state-driven navigation.
Let’s see what that looks like in Wasm.