You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the suggestion. I did look into this in the past, and don't feel comfortable opting into this, at least in its current form. The styles will always be different, the templates different, the callback arguments from events different leaving the only thing shared being the script tag. Svelte components tend to have a small script tag and most common logic is extracted into stores, or plain JS.
I feel that forcing a 1 for 1 component mapping between native and web could lead to compromises in application layout/design.
That being said, Svelte does has a pre-processor option which could be used to do this and remove the style and unwanted template based on target, so I will leave this to a preprocessor and not bake it into core.
actually, the main idea of share components is to shared basic view/presentation componentes, so the HTML/CSS and some basic JS, but yeah, I think the preprocessor can do it this like sveltejs/svelte#65 (comment)
Could be great if svelte-native support Code-Sharing like vue/angular https://nativescript-vue.org/en/docs/getting-started/code-sharing/
The text was updated successfully, but these errors were encountered: