refi64 / vuedart

Create Vue web apps in Dart
https://refi64.com/vuedart
310 stars 19 forks source link

Investigate exact reasons why typed Lists don't work #26

Open sclee15 opened 6 years ago

sclee15 commented 6 years ago

Hello. I am trying VueDart and it looks good. I am trying to implement "remove a item by clicking" feature. But it seems that ordinary List's remove() not working. Type 'List' should be 'List' to implement expected type 'List' What should I do?

refi64 commented 6 years ago

Ah, it was a weird issue with interaction between the way Dart handles lists and Vue's listeners (in theory, Vue 3.0 might actually fix this). In the mean time, I just removed the <TodoEntry> type.

As a side note: the "playground" should really be called "giant mess I use to make sure I didn't break anything". Right now VueDart doesn't really have any good examples, other than those in the docs. I'll have to add some in the future.

sclee15 commented 6 years ago

Hmm.. I am so sad that List is not supported and only workaround is that use a List. I thought type with Vue is the killer feature with VueDart. Do you expect that next version of Vue will gonna resolve this?

refi64 commented 6 years ago

Hmm.. I am so sad that List is not supported and only workaround is that use a List.

Just to be clear: the restriction is that you can't use typed lists.

Do you expect that next version of Vue will gonna resolve this?

...maybe? It's hard to know quite yet exactly (I might play around to see).

My best guess to this happening is due to Vue's listeners interacting oddly with Dart, so I hope. Regardless, it's something I should probably look into...