No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Framework suggestion: shorthand for two-way bind

    Framework
    2
    3
    184
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • FrankRuss
      FrankRuss last edited by

      if : is shorthand for a v-bind: [one-way bind] how about
      :: implemented as shorthand for a v-model: [two-way bind]

      😀

      1 Reply Last reply Reply Quote 0
      • qyloxe
        qyloxe last edited by qyloxe

        I would argue that it is rather a Vue thing than Quasar.

        Additionally this is a relevant read:
        https://en.wikipedia.org/wiki/Convention_over_configuration

        Personally I think it is a very generous use of “::” symbol just for one semantic use case. In Vue there is a concept of modifiers:

        https://vuejs.org/v2/api/#v-bind

        As for now, you can use default modifiers:

        <button :[key].prop.camel.sync="value"></button>
        

        One would argue, that your proposal of “::” prefix is equivalent to an implementation of a new modifier:

        <button :[key].twoway.reverse.async.anything.andotherthingorelse="value"></button>
        

        Exactly this topic has been discussed and resolved:

        https://github.com/vuejs/vue/issues/3666

        As I mentioned earlier, as for now “the official” solution is use of “convention” (mixins/computed/watchers) instead of “configuration” (magic prefixes, modifiers, symbols etc.).

        Hope this helps.

        1 Reply Last reply Reply Quote 1
        • FrankRuss
          FrankRuss last edited by

          You are right. Should not have posted that here. It’s really a Vue thing, not a Q thing.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post