owner stringclasses 14
values | repo stringclasses 14
values | id int64 116k 4.61B | issue_number int32 1 181k | author stringlengths 1 39 | body stringlengths 1 262k | created_at timestamp[us]date 2000-06-06 02:40:44 2026-06-02 20:16:18 | updated_at timestamp[us]date 2000-06-06 02:40:44 2026-06-02 20:22:56 | reactions unknown | author_association stringclasses 5
values |
|---|---|---|---|---|---|---|---|---|---|
vuejs | core | 544,543,327 | 344 | vue-bot | Hey @HcySunYang, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚
| 2019-10-21T14:34:18 | 2019-10-21T14:34:18 | {} | CONTRIBUTOR |
vuejs | core | 545,247,518 | 358 | yyx990803 | @Mayness can you re-submit the PR please? Sorry about that. | 2019-10-23T03:20:40 | 2019-10-23T03:20:40 | {} | MEMBER |
vuejs | core | 545,305,959 | 365 | LgnMs | 1 | 2019-10-23T07:19:05 | 2019-10-23T07:19:05 | {} | NONE |
vuejs | core | 545,476,925 | 356 | vue-bot | Hey @dlxqlig, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚
| 2019-10-23T14:40:47 | 2019-10-23T14:40:47 | {} | CONTRIBUTOR |
vuejs | core | 545,498,508 | 360 | vue-bot | Hey @wangtao0101, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚
| 2019-10-23T15:25:08 | 2019-10-23T15:25:08 | {} | CONTRIBUTOR |
vuejs | core | 546,262,886 | 374 | pikax | Can you do a rebase? | 2019-10-25T08:45:02 | 2019-10-25T08:45:02 | {} | MEMBER |
vuejs | core | 546,373,599 | 373 | yyx990803 | These are intentional as they serve documentation purposes. | 2019-10-25T14:19:34 | 2019-10-25T14:19:34 | {} | MEMBER |
vuejs | core | 546,609,125 | 385 | yyx990803 | This is never supported. Modifiers cannot be dynamic by design. | 2019-10-26T14:44:19 | 2019-10-26T14:44:19 | {} | MEMBER |
vuejs | core | 543,825,776 | 326 | yyx990803 | @sh7dm sorry totally missed that 🤦♂ | 2019-10-18T16:34:32 | 2019-10-18T16:34:32 | {} | MEMBER |
vuejs | core | 544,532,153 | 339 | vue-bot | Hey @sh7dm, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚
| 2019-10-21T14:09:36 | 2019-10-21T14:09:36 | {} | CONTRIBUTOR |
vuejs | core | 544,570,361 | 337 | yyx990803 | This should already be supported. It's the same as writing `{ ref: el => ... }` in render functions. | 2019-10-21T15:32:10 | 2019-10-21T15:32:10 | {
"+1": 1
} | MEMBER |
vuejs | core | 544,795,257 | 329 | vue-bot | Hey @a631807682, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚
| 2019-10-22T03:52:22 | 2019-10-22T03:52:22 | {} | CONTRIBUTOR |
vuejs | core | 545,354,486 | 365 | starkovsky | Do not abuse pull requests please... =( | 2019-10-23T09:25:42 | 2019-10-23T09:25:42 | {} | NONE |
vuejs | core | 545,495,182 | 359 | dsseng | @yyx990803 I should move it lower, but it doesn't unmount! it doesn't call anything on unmount | 2019-10-23T15:18:29 | 2019-10-23T15:18:29 | {} | CONTRIBUTOR |
vuejs | core | 546,368,503 | 369 | vue-bot | Hey @a631807682, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚
| 2019-10-25T14:05:57 | 2019-10-25T14:05:57 | {} | CONTRIBUTOR |
vuejs | core | 546,753,027 | 390 | yyx990803 | Yes, this is intentional. | 2019-10-28T00:44:46 | 2019-10-28T00:44:46 | {} | MEMBER |
vuejs | core | 546,594,995 | 381 | dlxqlig | Please close this, follow at #386. | 2019-10-26T11:37:58 | 2019-10-26T11:37:58 | {} | CONTRIBUTOR |
vuejs | core | 546,754,558 | 393 | vue-bot | Hey @sh7dm, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚
| 2019-10-28T00:59:34 | 2019-10-28T00:59:34 | {} | CONTRIBUTOR |
vuejs | core | 545,350,875 | 360 | haoliangwu | install vscode plugin `orta.vscode-jest` and add the following config item into `settings.json`:
```
"jest.debugCodeLens.showWhenTestStateIn": [
"fail",
"pass", // enable debug inline lens for passed test case
"unknown"
],
```
could solve everything. | 2019-10-23T09:16:57 | 2019-10-23T09:16:57 | {} | NONE |
vuejs | core | 545,495,896 | 360 | yyx990803 | I think it's nice to be able to debug tests without having to install a specific plugin. | 2019-10-23T15:19:58 | 2019-10-23T15:19:58 | {} | MEMBER |
vuejs | core | 545,498,230 | 359 | yyx990803 | It does. On element unmount the ref function should be called and receive `null`: https://github.com/vuejs/vue-next/blob/master/packages/runtime-core/src/createRenderer.ts#L1693 | 2019-10-23T15:24:32 | 2019-10-23T15:24:32 | {} | MEMBER |
vuejs | core | 543,824,374 | 326 | dsseng | @yyx990803 isn't this such a test? https://github.com/vuejs/vue-next/pull/326/commits/957b57808e89f94fdfda403b7b591fd114477610#diff-8832b6a654c35138b8742b43cbb14aedR359 | 2019-10-18T16:31:42 | 2019-10-18T16:31:42 | {} | CONTRIBUTOR |
vuejs | core | 544,324,285 | 316 | HanSummer | @xiake-1024 Please try : lerna changed | 2019-10-21T02:26:23 | 2019-10-21T02:26:23 | {} | NONE |
vuejs | core | 544,859,936 | 351 | underfin | template
```
<div style="margin: 0 0" :class="{ 'color': count ? 'blue' : 'red'}">{{count}}</div>
```
gencode through vue.global.js build by `npm run dev`
```
const _hoisted_1 = {"margin":"0 0"}
// ...
return (_openBlock(), _createBlock("div", null, [
_createVNode("div", {
style: _hoisted_1,... | 2019-10-22T08:35:02 | 2019-10-22T11:56:20 | {} | MEMBER |
vuejs | core | 545,482,598 | 359 | yyx990803 | Should also test unmount? | 2019-10-23T14:52:44 | 2019-10-23T14:52:44 | {} | MEMBER |
vuejs | core | 545,516,133 | 18 | yyx990803 | This is the case of v3 with block optimizations. | 2019-10-23T16:02:20 | 2019-10-23T16:02:20 | {} | MEMBER |
vuejs | core | 546,397,010 | 377 | vue-bot | Hey @Junyan, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚
| 2019-10-25T15:20:06 | 2019-10-25T15:20:06 | {} | CONTRIBUTOR |
vuejs | core | 543,888,919 | 331 | vue-bot | Hey @Himself65, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚
| 2019-10-18T18:59:07 | 2019-10-18T18:59:07 | {} | CONTRIBUTOR |
vuejs | core | 545,359,187 | 365 | hsxfjames | Seems there is nothing to be done. I think you could close it? | 2019-10-23T09:37:44 | 2019-10-23T09:37:44 | {} | NONE |
vuejs | core | 545,481,205 | 351 | yyx990803 | Good catch. Hoisted static styles should be treated as constants. Fixed in 113339c | 2019-10-23T14:49:50 | 2019-10-23T14:49:50 | {} | MEMBER |
vuejs | core | 546,377,893 | 376 | vue-bot | Hey @underfin, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚
| 2019-10-25T14:30:54 | 2019-10-25T14:30:54 | {} | CONTRIBUTOR |
vuejs | core | 546,594,581 | 385 | dsseng | Oh no, it's red, it needs a lot of tests updates. I can do that, but I'm interested in @yyx990803 opinion on this so I won't update tests in incorrect PR. | 2019-10-26T11:31:06 | 2019-10-26T11:31:06 | {} | CONTRIBUTOR |
vuejs | core | 543,828,365 | 326 | vue-bot | Hey @sh7dm, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚
| 2019-10-18T16:39:47 | 2019-10-18T16:39:47 | {
"heart": 1
} | CONTRIBUTOR |
vuejs | core | 544,287,520 | 341 | yyx990803 | `cacheHandlers` can be enabled in function mode. The only condition is it cannot be used without `prefixIdentifiers: true`. | 2019-10-20T20:08:07 | 2019-10-20T20:08:07 | {} | MEMBER |
vuejs | core | 544,529,802 | 340 | yyx990803 | Hmm, not sure what I expected when I left that TODO... but probably it was left before `config.errorHandler` was implemented. With `config.errorHandler` user already has full control over the behavior. Thanks for the PR though. | 2019-10-21T14:03:59 | 2019-10-21T14:03:59 | {} | MEMBER |
vuejs | core | 545,358,092 | 365 | LgnMs | sorry...
------------------ 原始邮件 ------------------
发件人: "Vlad Starkovsky"<notifications@github.com>;
发送时间: 2019年10月23日(星期三) 下午5:26
收件人: "vuejs/vue-next"<vue-next@noreply.github.com>;
抄送: "lgn"<792841450@qq.com>;"Author"<author@noreply.github.com>;
主题: Re: [v... | 2019-10-23T09:34:58 | 2019-10-23T09:34:58 | {} | NONE |
vuejs | core | 545,473,000 | 349 | yyx990803 | Thanks for the PR. I noticed the current space handling behavior is not complete. We actually need an option to treat spaces between elements differently like the [2.x `whitespace` compiler option](https://github.com/vuejs/vue/tree/dev/packages/vue-template-compiler#options). | 2019-10-23T14:32:24 | 2019-10-23T14:32:24 | {} | MEMBER |
vuejs | core | 546,172,537 | 368 | yyx990803 | This shouldn't be the default. Snapshots should only be updated after manual inspection. | 2019-10-25T02:20:56 | 2019-10-25T02:20:56 | {} | MEMBER |
vuejs | core | 546,652,879 | 386 | dlxqlig | close for conflict. | 2019-10-27T01:12:30 | 2019-10-27T01:12:30 | {} | CONTRIBUTOR |
vuejs | core | 465,748,612 | 4 | yyx990803 | @octref static properties are mapped to options, e.g.
``` js
class App extends Component {
static template = `<div>{{ msg }}</div>`
}
```
I don't think static properties are semantically correct for props. | 2019-02-20T20:50:43 | 2019-02-20T20:50:43 | {} | MEMBER |
vuejs | core | 469,830,130 | 21 | yyx990803 | I like the idea. Was hesitant because we have been using `data` for so long but I agree `state` actually makes more sense. | 2019-03-05T19:42:54 | 2019-03-05T19:42:54 | {} | MEMBER |
vuejs | core | 471,377,953 | 20 | yyx990803 | @octref interesting, so the `.dts` is updated by a build step... (and can be done continuously during dev) which I think acceptable for users using TSX. However the way Stencil does it requires the JSX elements to be registered as global intrinsic elements instead of value-based elements. Is there anyway for a `.d.ts` ... | 2019-03-11T01:45:00 | 2019-03-11T02:38:07 | {} | MEMBER |
vuejs | core | 472,249,978 | 23 | yyx990803 | @LinusBorg if a ref is returned there's no need to use `.value` in the template so it could just be `v-model="computedWSetterRef"`
> What if we want to watch a ref returned in created, or use it in a computed property? Since those are defined before created is called, won't there be issues?
Yeah I think in that c... | 2019-03-13T02:01:52 | 2019-03-13T02:01:52 | {} | MEMBER |
vuejs | core | 474,049,093 | 23 | LinusBorg | I think another aspect, not necessarily related to mixins, is that you don't spread parts of a behaviour over different parts of your component, i.e. data&created&watch&destroyed. You can define the whole lifecycle of a piece of behaviour in one place. | 2019-03-18T18:40:18 | 2019-03-18T18:40:18 | {
"+1": 1
} | MEMBER |
vuejs | core | 475,174,380 | 27 | Akryum | - It's unclear to me what `cloneVNode`does exactly :(
- We should definitely be able to declare events just like we do with props and remove them from `$attrs`, otherwise this may be very confusing. Also typically you want to customize some events behavior in a HOC and re-emit them as custom events, so some it would b... | 2019-03-21T10:14:57 | 2019-03-21T10:14:57 | {} | MEMBER |
vuejs | core | 456,142,808 | 8 | yyx990803 | Just linking this comment here for reference (implementation details) https://github.com/vuejs/vue-next/issues/9#issuecomment-429974290 | 2019-01-21T17:07:38 | 2019-01-21T17:07:38 | {} | MEMBER |
vuejs | core | 467,225,106 | 20 | posva | Looks good, my only concern right now is regarding _Two Ways of Doing the Same Thing_
There will be a preferred way that we will have to advise for (advanced) users and I'm afraid we lose a big part of our users who enjoy the simplicity of Vue because we cannot ensure all articles and content around there are written ... | 2019-02-25T23:21:24 | 2019-02-25T23:21:24 | {} | MEMBER |
vuejs | core | 468,708,447 | 20 | yyx990803 | @chrisvfritz
> Even _within_ the class implementation, we'd have different best practices and caveats depending on whether native classes, Babel classes, or TypeScript classes are used.
There really is only one difference, that is the usage of decorator for props in TypeScript.
The proposal intentionally cove... | 2019-03-01T15:44:11 | 2019-03-01T18:32:21 | {} | MEMBER |
vuejs | core | 471,333,375 | 20 | octref | @yyx990803 You might want to look into [Stencil](https://stenciljs.com).
- They have a similar `@Prop` API: https://stenciljs.com/docs/my-first-component/
- From `@Prop` decorator they generate such `d.ts` for each component (so JSX/TSX auto completion works):
```tsx
import { Component, Prop } from '@stenci... | 2019-03-10T18:56:34 | 2019-03-10T20:26:44 | {} | MEMBER |
vuejs | core | 474,781,027 | 24 | LinusBorg | ### Naming of "refs"
> The `value` API creates a wrapper object for a value, called a **ref**. A ref is a reactive object with a single property: .value. The property points to the actual value being held and is writable:
Can we call this "reactive ref" or something? or drop in a note about not to confuse them wi... | 2019-03-20T10:54:53 | 2019-03-20T11:47:29 | {} | MEMBER |
vuejs | core | 475,164,506 | 5 | yyx990803 | Closed in favor of #27 | 2019-03-21T09:41:18 | 2019-03-21T09:41:18 | {} | MEMBER |
vuejs | core | 475,595,570 | 24 | HcySunYang | If I don't misunderstand, the `value` api is used to solve the problem that the `state` api does not support the primitive value, so why not limit `value` api to only accept primitive value as a parameter? this prevents users from writing weird code:
```js
const objRef = value({ value: 123 })
objRef.value.value /... | 2019-03-22T12:04:17 | 2019-03-22T12:41:55 | {} | MEMBER |
vuejs | core | 475,616,205 | 30 | LinusBorg | Concerning Adoption strategies: The compatibility build won't be able to provide complete compatibility in this regard, since an "old" app would still try and use the global constructor to do mixins etc., right? | 2019-03-22T13:14:37 | 2019-03-22T13:14:37 | {} | MEMBER |
vuejs | core | 466,044,713 | 4 | yyx990803 | > So are both cases below invalid, because `msg` does not exist on `this` in runtime?
Correct. It *may* be on `this.$props`, but definitely not on `this`.
> Whereas in TS, does the below case mean...
No. This is a part where the type is currently mismatched with the runtime behavior. Declaring a props interfac... | 2019-02-21T15:34:14 | 2019-02-21T15:34:14 | {} | MEMBER |
vuejs | core | 467,229,988 | 20 | yyx990803 | I just realized an important drawback of using decorators for props would be TSX inference :/ | 2019-02-25T23:40:57 | 2019-02-25T23:40:57 | {} | MEMBER |
vuejs | core | 474,033,239 | 23 | chrisvfritz | @yyx990803 I might have some ideas for how we could build on top of current mixins instead and avoid adding much new API or concepts, but first I want to make sure I'm understanding the full advantages this syntax provides. The ones I've seen are:
- We're explicit about what's exposed to the component rather than fo... | 2019-03-18T17:59:29 | 2019-03-18T18:00:14 | {} | CONTRIBUTOR |
vuejs | core | 475,455,809 | 28 | yyx990803 | @Akryum
> Will functional component function be able to return a Promise?
No. It must return a VNode.
> attach props to the function itself => Will this play nice with TypeScript?
Like @posva said, with TS you have to use the `FunctionalComponent` interface (if you want type for all arguments). Otherwise y... | 2019-03-22T00:51:50 | 2019-03-22T00:51:50 | {} | MEMBER |
vuejs | core | 458,220,923 | 8 | chrisvfritz | @yyx990803 Happy to. 🙂 Filling out the RFC now. | 2019-01-28T17:19:09 | 2019-01-28T17:19:09 | {} | CONTRIBUTOR |
vuejs | core | 458,299,631 | 8 | chrisvfritz | This is now a [public RFC](https://github.com/vuejs/rfcs/pull/8), so further discussion should happen there. @Justineo Your thoughts on the [best compromise for spreading an object](https://github.com/chrisvfritz/rfcs/blob/replace-v-bind-sync-with-v-model-argument/active-rfcs/0004-replace-v-bind-sync-with-v-model-argum... | 2019-01-28T21:01:39 | 2019-01-28T21:01:39 | {} | CONTRIBUTOR |
vuejs | core | 465,701,670 | 4 | octref | I think this API would be cleaner. It's the same in JS/TS usage.
```ts
class App extends Component {
// props
static msg = 'foo';
// data
count = 0;
}
```
TS advanced usage, for more expressiveness:
```ts
type T = 'foo' | 'bar';
class App extends Component {
// no need to write `stati... | 2019-02-20T18:36:49 | 2019-02-20T18:36:49 | {} | MEMBER |
vuejs | core | 466,109,596 | 4 | octref | > AFAIK there's no easy way to augment `this` type in a class based on its static properties, or is there?)
Purely with types I don't know. I can give it a try together with @DanielRosenwasser.
> 2. The props interface only affects `this.$props`
I'm not sure, for me I think https://github.com/itsFrank/vue-type... | 2019-02-21T18:22:31 | 2019-02-21T18:22:46 | {} | MEMBER |
vuejs | core | 469,163,948 | 20 | octref | > since I think it would solve all our problems regarding TypeScript.
It'll help Vetur to do auto completion and diagnostic error checking, but I think that's not necessarily a solution to the motivation on:
- Having an authoring format (class) that aligns with internal implementation for alleviate Vue's mainten... | 2019-03-04T08:36:28 | 2019-03-04T08:36:28 | {} | MEMBER |
vuejs | core | 469,584,878 | 20 | littledan | I'd like to see if the issue with private can be fixed. I'm wondering, would it be reasonable for the `Vue` constructor to return the observation `Proxy`, rather than the `$state`? This way, the subclass constructor would see the observed thing as the `this` value, and private fields and methods would be added on the P... | 2019-03-05T08:22:12 | 2019-03-05T08:22:12 | {} | NONE |
vuejs | core | 471,079,778 | 20 | DanielRosenwasser | So I spoke with @octref a bit about the current proposal. On the whole, data, computed, and methods all seem great. The only strange piece is props for TypeScript users. Here's a bit of the friction that users will likely run into that you may want to consider.
# Issues with decorators
While decorators make *inte... | 2019-03-08T21:19:34 | 2019-03-08T21:20:51 | {} | CONTRIBUTOR |
vuejs | core | 475,869,330 | 26 | posva | Regarding TS users, they won't be able to use this, would they?
About the runtime check, I know it's unrelated, but are we still leaving it for development only? | 2019-03-23T13:21:48 | 2019-03-23T13:21:48 | {} | MEMBER |
vuejs | core | 475,890,905 | 24 | yyx990803 | > About the watcher firing synchrously by default, putting a nexttick inside the callback would still run the function twice though, wouldn't it?
Why? | 2019-03-23T17:55:37 | 2019-03-23T17:55:37 | {} | MEMBER |
vuejs | core | 443,074,459 | 9 | chrisvfritz | @Jinjiang Ah, I see. If I understand correctly, it's because `modelValue` has special behavior specific to the element it's added to. For example, on a `<select>` element it will not map to a `value` attribute, but instead add `selected` to the appropriate `<option>`. Does that make sense? | 2018-11-30T03:01:25 | 2018-11-30T03:01:25 | {} | CONTRIBUTOR |
vuejs | core | 467,385,161 | 20 | gustojs | I like it and in the basic form, it looks relatively easy even for people without TS, React or Angular experience. I can imagine two questions being asked by potential users:
- how does it look like with Vuex?
- will the tools support it from day 1
But in both cases it's too early for that. | 2019-02-26T10:29:34 | 2019-02-26T10:30:00 | {} | MEMBER |
vuejs | core | 471,905,110 | 23 | LinusBorg | Another thought crossing my mind: Since this is a completely new API, shouldn't we be able to port it to v2, or at least `2.x-next` (which will be using the new Porxy-based Reactivity system?
Would make it possible to use new packages that expose hooks in in 2.0 apps that are not ready tpo be migrated.
And yes, I... | 2019-03-12T08:35:26 | 2019-03-12T08:35:26 | {} | MEMBER |
vuejs | core | 471,930,366 | 23 | Akryum | Some thoughts:
- What about computed setters?
- Why not `onMounted` instead of `useMounted`? I find it more natural to write. Maybe having `onXXX` for side-effects only "'hooks" is more Vue-like, and `useXXX` could be for "hooks" that returns a reference?
- I'm not so sure about having `watch` being immediate by def... | 2019-03-12T09:51:30 | 2019-03-12T09:57:03 | {} | MEMBER |
vuejs | core | 475,595,788 | 27 | LinusBorg | There's also the topic of custom directives used on components. those also don't work anymore (or atleast don't make sense anymore), since we now have Fragements support and there's no guaranteed root element.
Were should we document this? Here? or in #29 ? | 2019-03-22T12:05:00 | 2019-03-22T14:04:26 | {} | MEMBER |
vuejs | core | 443,258,741 | 4 | znck | @chrisvfritz I think, Evan meant `Component<Props, Data>` instead of `Component<Props>`. | 2018-11-30T16:28:18 | 2018-11-30T16:29:14 | {} | MEMBER |
vuejs | core | 465,407,583 | 4 | octref | > avoid defining types twice for each prop
Don't think this concern by @chrisvfritz is addressed. I doubt TS users would use the `msg: String` runtime type-checking over dev-time type-checking. Is `props` optional and only for the runtime "validation" purpose?
Are both cases below valid usages in 3.0?
```ts
i... | 2019-02-20T03:32:26 | 2019-02-20T03:32:26 | {} | MEMBER |
vuejs | core | 467,228,727 | 20 | nickmessing | Is there any plan to add type-checking for events?
At the moment for TSX I use this syntax:
```ts
type Props = {
tmp: string
alpha?: boolean
}
type Events = {
click: string
something: boolean
a: number
b: void
}
type ScopedSlots = {
s1?: {
click?: string
attr: boolean
}
s... | 2019-02-25T23:35:38 | 2019-02-25T23:35:38 | {} | MEMBER |
vuejs | core | 470,000,835 | 20 | octref | So the decorator-less TS equivalent of this:
```ts
import { prop } from '@vue/decorators'
class MyComponent extends Vue {
@prop count: number
}
```
Would be this:
```ts
interface Props {
count: number;
}
class MyComponent extends Vue<Props> {
static props = {
count: Number;
}
}
``... | 2019-03-06T07:36:00 | 2019-03-06T07:36:26 | {} | MEMBER |
vuejs | core | 472,107,916 | 23 | LinusBorg | > What about computed setters?
Would that work?
```javascript
function computedWithSetter(getter, setter) {
const computedRef = computed(getter)
return Object.defineProperty(res, 'value',{
get() { return computedRef.value }
set: setter,
})
}
```
```javascript
created() {
const computedW... | 2019-03-12T17:44:05 | 2019-03-12T17:50:30 | {} | MEMBER |
vuejs | core | 475,619,043 | 27 | KaelWD | Aren't directives going to take VNodes now instead of an element? | 2019-03-22T13:23:53 | 2019-03-22T13:23:53 | {} | CONTRIBUTOR |
vuejs | core | 475,870,387 | 27 | posva | > The implicit behavior is convenient in cases where it works, but can be confusing in cases where it doesn't
Whereas I agree with that, isn't automatic inherit still the most common case (except for multiple children). When developing components in apps, I won't add the `v-bind="$attrs"` until I have the need to ad... | 2019-03-23T13:36:55 | 2019-03-23T13:36:55 | {} | MEMBER |
vuejs | core | 435,486,832 | 8 | chrisvfritz | > Keep `v-model` for the old magic and only provide arguments for non-value bindings. This will make our syntax inconsistent: `v-bind:title` stands for binding single prop while `v-bind` stands for binding all passed props. So is `v-on`. If we have both `v-model` and `v-model:title` it'll seem confusing with the experi... | 2018-11-02T19:38:43 | 2019-01-28T17:33:35 | {} | CONTRIBUTOR |
vuejs | core | 475,602,154 | 24 | LinusBorg | > so why not limit value api to only accept primitive value as a parameter?
Also thougth about this, but this would make it harder for people to write code like this:
```javascript
const options = state('default')
// something happens:
options.value = {
// options object for more specific setup
}
//... | 2019-03-22T12:26:44 | 2019-03-22T12:27:03 | {} | MEMBER |
vuejs | core | 475,888,995 | 24 | yyx990803 | @posva
> What has to be returned exactly by the watcher? Is it like a computed property created on the fly and observing the resulting value?
A watcher getter can return anything. The getter fires whenever any dependency changes, and the callback only fires when the return value changes. If the user wants to see ... | 2019-03-23T17:30:06 | 2019-03-23T17:30:24 | {} | MEMBER |
vuejs | core | 456,143,083 | 8 | yyx990803 | @chrisvfritz I'm starting to prepare for moving things we are discussing here to public RFCs. Do you want to champion this one? | 2019-01-21T17:08:33 | 2019-01-21T17:08:33 | {} | MEMBER |
vuejs | core | 466,123,167 | 4 | yyx990803 | The problem with decorators is that the proposal still faces a lot of uncertainty at this point, so I'd like to avoid relying on it.
I think it makes sense for the interface to augment `this` **if the runtime declaration is also present** - otherwise it's possible for the user to end up with code like this:
``` t... | 2019-02-21T18:59:27 | 2019-02-21T18:59:27 | {} | MEMBER |
vuejs | core | 468,667,848 | 20 | chrisvfritz | I have the same hesitation as @posva regarding fragmentation and complexity. Even _within_ the class implementation, we'd have different best practices and caveats depending on whether native classes, Babel classes, or TypeScript classes are used. We're also warning people _not_ to use some features of classes in some ... | 2019-03-01T13:40:29 | 2019-03-01T13:40:29 | {} | CONTRIBUTOR |
vuejs | core | 470,970,138 | 20 | yyx990803 | @octref
For the following
```js
class MyComponent extends Vue {
@prop foo: ComplexType;
}
```
This doesn't provide types for `this.$props`. So the equivalent would only have `static props = { ... }`.
On the other hand, I don't know if we can keep the inference working with the following:
``` js
c... | 2019-03-08T15:35:55 | 2019-03-08T15:36:56 | {} | MEMBER |
vuejs | core | 472,311,170 | 23 | LinusBorg | > I'm thinking of removing watch option and this.$watch altogether because they are non-treeshakable.
Considering our promise of keeping the Vue 3 API largely compatible to 2.0, I don't think we should/can remove APIs for the sole reason of shaving a few bytes of the final bundle in a few use cases. | 2019-03-13T07:32:37 | 2019-03-13T07:32:51 | {} | MEMBER |
vuejs | core | 472,716,957 | 23 | yyx990803 | @LinusBorg
Yes, this proposal should work more along the lines of typical JavaScript intuitions than React hooks.
Re refs: once a ref is exposed to the instance they just become normal properties.
For the sake of discussion, let's call it "Vue blocks" (to differentiate from React hooks and lifecycle hooks)... ... | 2019-03-14T06:09:02 | 2019-03-14T06:10:14 | {} | MEMBER |
vuejs | core | 474,777,106 | 25 | Akryum | I could totally see a babel plugin compiling `res =` to `res.value = ` 😸 | 2019-03-20T10:42:28 | 2019-03-20T10:42:28 | {} | MEMBER |
vuejs | core | 475,169,893 | 29 | Akryum | > Context-free VNodes
What impact can this have on the devtools?
- Will we still be able to access a component from DOM elements?
- Will `instance.$vnode` and `vnode.componentInstance` sill work?
- Functional components will have a context so they can be displayed in the devtools? | 2019-03-21T10:00:45 | 2019-03-21T10:00:45 | {} | MEMBER |
vuejs | core | 475,617,048 | 24 | HcySunYang | @LinusBorg
Hi, I mean only restrict `value()` api to accept the primitive value as a parameter, `state()` api still accepts non-primitive values.
The following are allowed:
```js
const obj = state({ value: 123 })
obj.value // clear
const countRef = value(0)
countRef.value // clear
```
But not allow... | 2019-03-22T13:17:20 | 2019-03-22T13:17:20 | {} | MEMBER |
vuejs | core | 475,866,204 | 24 | posva | If `value(3)` is equivalent for `state({ value: 3 })`, why not make `state` behave like value with any non-object value and remove `value` altogether?
What has to be returned exactly by the watcher? Is it like a computed property created on the fly and observing the resulting value? I'm asking because it already cau... | 2019-03-23T12:35:19 | 2019-03-23T12:35:19 | {} | MEMBER |
vuejs | core | 475,889,812 | 25 | yyx990803 | > I don't get why using value instead of state here.
Yes, the fetch example can use `state` instead.
For the mouse example, if you return a plain object, `x` and `y` becomes actual JavaScript values, and they will never update. Then you would have to bind the object like this instead:
``` js
data() {
const... | 2019-03-23T17:40:48 | 2019-03-23T17:40:48 | {
"+1": 1
} | MEMBER |
vuejs | core | 475,890,750 | 27 | yyx990803 | @LinusBorg @KaelWD
> There's also the topic of custom directives used on components.
That's a good point. Yeah I don't think it makes sense anymore.
The directive API is indeed going to change so that will be another RFC.
---
@posva
> Whereas I agree with that, isn't automatic inherit still the most... | 2019-03-23T17:53:35 | 2019-03-23T17:54:48 | {} | MEMBER |
vuejs | core | 475,888,261 | 24 | yyx990803 | @posva @HcySunYang
`value(3)` is different from `state({ value: 3 })`. A ref is differentiable from a normal reactive object in the following ways:
- a ref, when returned from `data()`, is bound as a direct property so it doesn't have to be accessed as `xxx.value` in templates.
- a ref can be watched directly... | 2019-03-23T17:21:06 | 2019-03-23T17:21:06 | {} | MEMBER |
vuejs | core | 475,890,832 | 24 | posva | It's clearer now but there are still some things not clear for me regarding the usage of state and value.
About the watcher firing synchrously by default, putting a nexttick inside the callback would still run the function twice though, wouldn't it? | 2019-03-23T17:54:50 | 2019-03-23T17:54:50 | {} | MEMBER |
vuejs | core | 474,760,676 | 24 | LinusBorg | Love it! <3
> Should we deprecate `this.$watch` and watch component option?
> Sidenote: removing `this.$watch` and the watch option also makes the entire watch API completely tree-shakable.
**deprecate** or **remove** ?
We should *deprecate* them, but **not** *remove* them.
While removing them would make t... | 2019-03-20T09:54:08 | 2019-03-20T09:54:08 | {} | MEMBER |
vuejs | core | 475,541,418 | 27 | nekosaur | > What about a new option called `emits`? (to differentiate it from the old `events` option)
Being able to declare slots in the same way could similarly help with automatic doc generation and autocompletion. But on its own perhaps that's not enough added value to be considered? | 2019-03-22T08:57:35 | 2019-03-22T08:57:35 | {} | CONTRIBUTOR |
vuejs | core | 475,624,095 | 24 | HcySunYang | I got your point, this is really a problem. | 2019-03-22T13:39:19 | 2019-03-22T13:39:19 | {} | MEMBER |
vuejs | core | 475,891,524 | 24 | posva | If the watcher fires synchrously, we may queue up multiple callbacks with nexttick, right? We are delaying the execution but still executing multiple times | 2019-03-23T18:03:31 | 2019-03-23T18:03:31 | {} | MEMBER |
vuejs | core | 445,121,158 | 18 | chrisvfritz | @posva But my thinking is this would eliminate a lot of those reuse problems, which we've all seen beginners run into. I think the actual edge case is the rare instance when the performance impact from not reusing an element is even measurable. Honestly, I don't think I've _ever_ had a use case where this would matter,... | 2018-12-07T04:43:43 | 2018-12-07T04:43:43 | {} | CONTRIBUTOR |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.