Giter Club home page Giter Club logo

Comments (5)

SilentDepth avatar SilentDepth commented on April 27, 2024 1

So using Typescript in a vue project will not be a good idea. Am I correct?

It's hard to say (at this moment). The post you linked is mostly talking about Vue 2, but Vue 3 will be a different story. I believe Vue 3 will be better than ever, however I cannot give you any evidence on that. Obviously there are still months for us to see the progress of Vue 3 development, and anything could happen.

Is it recommended to use function api and typescript together?

Yes. One of the goals of Function API proposal is to provide a better compatibility with TypeScript (than the abandoned Class API Proposal).

I have read this comment some where (Vue@3 will have improved typescript support), is it still correct?!

Definitely yes.

from composition-api.

beeplin avatar beeplin commented on April 27, 2024

Please read https://github.com/vuejs/rfcs/blob/function-apis/active-rfcs/0000-function-api.md ;)

from composition-api.

posva avatar posva commented on April 27, 2024

Using Typescript for a project seems like a good idea if you want that typing. You can also opt-out of TS whenever needed, so you can apply it only to your business logic. It's true that the function api solves many of the existing problems today with Typescript and Vue. So it's up to you to use it or not for your components

Regarding using Vue-function-api for your app, you don't need to. Vue 3 will also support the object syntax. You can use this if you want to experience with a slightly different way of thinking. It may indeed make things easier to migrate to the final function api in Vue 3 but you don't need to write your components that way for Vue 3, it's an optional advanced feature

There was a prototype that allowed to move from the object syntax to the function api one but it's not public yet since the RFC hasn't been merged yet which means we are still discussing some last bits of it before saying this is the way we will go

from composition-api.

MatanYadaev avatar MatanYadaev commented on April 27, 2024

@posva What's the difference between function API and composition API?
Why here the docs is about reactive method and in this repo is value? https://vue-composition-api-rfc.netlify.com/

from composition-api.

posva avatar posva commented on April 27, 2024

it's the same. It's all part of an evolving RFC, names changed, this lib adapted the names very recently in the v3. This library is meant to allow people use the new syntax before it's available in Vue 3

from composition-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.