KevinnZou / compose-webview-multiplatform

WebView for JetBrains Compose Multiplatform
https://kevinnzou.github.io/compose-webview-multiplatform/
Apache License 2.0
318 stars 40 forks source link

Exposing possibility of using koin for Dependency Injection #150

Open nilufer32 opened 3 weeks ago

nilufer32 commented 3 weeks ago

Great job with the repo Kevin! I wanted to ask if there would be a possibility to use Koin for injecting the webview instance into the UiKitview composable wrapper instead of creating a new instance each time the composable is called. This would be useful for things like early initialization and decreasing the delay associated with each new request sent to the webview. Thanks in advance!

KevinnZou commented 3 weeks ago

@nilufer32 Thank you for sharing your suggestion! I really appreciate your idea, however, it may be a bit challenging to implement it in a multiplatform environment. Each platform has its own unique logic, which makes it difficult to abstract the creation of the Webview. Nonetheless, since this functionality is quite useful, I will continue to research it and try to find a way to support it. If you have any ideas, you are more than welcome to submit a PR.