-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coffee-/ plain JavaScript? #20
Comments
It is plain JavaScript, just using the latest syntax. It would probably take less time for you to just search for a quick ES2015 tutorial/video than for me to rewrite the examples. |
With plain JS I've meant something without the ES6 stuff (imports etc.). But it was not intended to steal your rare time. I've searched and traid for hours without success, otherwise I havn't asked here. Sorry for bothering you! |
You could transpile it using babel website in order to see the equivalent in ES5 (https://babeljs.io/repl/) |
Thanks for the advice. But I've tried it yesterday and the transpiled code is a mess. Finally I got Vuex running in coffeescript. Only the store/index.js from the cart example is still JS. |
@dspangenberg do you have a public repository of vuex in coffeescript ? |
In case it's useful, I've done the basic |
Does anyone knows how to implement namespacing for getters/actions in coffeescript? |
@kticka I have the same issue with coffeescript+vuex. wondering if you came up with a solution. |
What exactly is the problem with namespaces and coffeescript? |
in
Actually I cannot say it is a namespace issue, since putting
I came up with "the splats syntax is not mature in coffeescript yet". |
Oh, so the problem is that coffeecript doesn't support/ have a object rest spread operator. Seems there's a PR open for this, but not merged: jashkenas/coffeescript#4473 You will have to use an equivalent of Object.assign() (no idea how to write that in CS): computed: Object.assign(
Vuex.mapState ['data1', 'data2'],
{
// normal computed props go here...
}) |
Thank you @LinusBorg. It works. Just wondering if there is any cleaner way. |
Could you please give an example in Coffeescript or plain JavaScript? Thanks!
The text was updated successfully, but these errors were encountered: