-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embrace .vue files? #4
Comments
I am all in for |
I think I removed |
For me the reason to switch to fable with vue.js is compile time errors and here I mean compile errors for templates as well. So I'd rather go something like jsx for this from the beginning |
The idea with this library is not make a clone of elmish/react with yet another html DSL because they would really be just the same library and I would see no reason why would someone use fable-vue or fable-elmish with react if we did that. We could still have partial support for it but still have full |
@Zaid-Ajaj Let me be more precise - I love Vue's template engine, it's super intuitive and easy to use, but I'm really missing the compile time template errors. Being able to use Vue.js with typed code and templates would be incredible. Therefore if it is impossible to do with Fable and Vue templates, I'm ok to use jsx which is well-known and widespread. |
I was thinking to start using Vue's templates as this should be shortest path to an MVP, and also because this may appeal to developers that prefer to use a templating system instead of generating the views in code. But you have a very good point @Lanayx in that type-safe templates would be one of the selling points of using a statically typed language like F# with Vue. After we've finished implementing the rest of the concepts, it shouldn't be very difficult (hopefully) to add helpers to generate the render function in F# (although we cannot use JSX because F# doesn't accept macros). We could have an API similar to Fable.React or take the opportunity to try something new, like @Zaid-Ajaj has been doing for Xamarin. |
Agree, starting with untyped templates as MVP makes sense. |
Apparently Vue promotes writing components in a single file with .vue extension mixing HTML, JS and CSS. This is not only for aesthetics, using
vue-loader
you get template precompilation, CSS scoping and HMR support. Luckily you can redirect each part to a different file, so I guess we could do something like this:This is probably not without challenge though as it can mess with the F# project structure. Should we go this road to get the benefits of
vue-loader
?The text was updated successfully, but these errors were encountered: