Closed mjablecnik closed 2 years ago
Zap is no magic and compiles to intermediate Dart files, so you can use the existing tooling Dart provides to interop with JavaScript (in particular, package:js).
I agree that the docs could benefit from an example here, is there any library in particular that you have in mind? I think svelte has a mapbox example, I could port that to zap and include it in the examples.
I think any small example about Dart interoparability with JS in documentation would be great. So I think that mapbox example can be sufficient. :)
I've added a mapbox example using riverpod for state management in 169575daba301afbc6ed8b1bf772f315478e0642.
I see that with Zap I can create code in Dart and import Dart packages on the frontend. But what when I will want to use some JavaScript library in my project? Is somewhere some example of how Zap can interop with JavaScript?