GithubHelp home page GithubHelp logo

Comments (2)

yyx990803 avatar yyx990803 commented on May 13, 2024

I think most of your arguments have been addressed in this reply.

from rfcs.

jonaskuske avatar jonaskuske commented on May 13, 2024

(I need to find in setup() where a value is, where a method is, and which fields are computed, whether a field named isEnabled is value or computed)

With the current API, you need to figure out whether isEnabled is a value or computed so you can find it, because they are in different locations.
Then you need to find where a related method is, because it it somewhere further down the file, between other methods doing completely unrelated things.

With the function-based API, you just need to figure out "what is this code doing", get to that part of setup() and everything will be right there – isEnabled can be there no matter if it's a value or computed, the respective methods can be right next to it, no searching necessary.

You probably use Single File Components, instead of putting all the <script> sections of your components into one folder, the HTML template into another folder and the styles in a third. Precisely because grouping things that are related and have the same concern makes for better ergonomics.

All that said, if you want to group by type, the setup() API is flexible enough to allow for that.

from rfcs.

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.