Tried to deal with the architecture of alt and flux

I can not understand why the collector swears at the decorator @bind

This is what the browser does.

Here is the source code of the file where the error occurs:

import alt from '../alt' import Actions from '../actions' import {decorate, bind, datasourse} from 'alt-utils/lib/decorators' @decorate(alt) class ChatStore { constructor() { this.state = {user: null} } @bind(Actions.login) login(user) { this.setState({user: user}) console.log('ChatStore user', user); } } export default alt.createStore(ChatStore) 

Here's the full version of the source code: https://bitbucket.org/AtNovember/studyflux/

  • How curses something though? By the way, I don’t see the transformation for decorators in your package.json, Babel (the sixth) doesn’t know how to do it out of the box - Duck Learns to Hide
  • @ Duck LEARN THANKS Thank you! Yes, I forgot to attach a screenshot. This is how i.stack.imgur.com/eShPy.png swears - Inessa Pokromkina
  • You do not have a transformer for decorators. Least. The current Babel decorators out of the box can not, the reason now is this. I will not write magic lines for you now, there is no time to figure it out, but the reason for this is in fact. If you want to figure it out yourself, smoke here: babeljs.io/docs/plugins/transform-decorators - Duck Learns to Take Cover
  • Plus, probably, it will be necessary to dance with a tambourine so that the decorator's plug-in would work out before any other presets, but this is then - Duck Learns to Take Cover
  • About: technologyadvice.imtqy.com/es7-decorators-babel6 - Duck Learns to Take Cover

0