We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey there,
I am interested in using alt for my current project and at the same time have decided to not use ES6, are there any ES5 examples of using Alt?
Thanks.
The text was updated successfully, but these errors were encountered:
There are examples scattered about everywhere but not in a single place in particular.
You can use regular old constructors and prototypes:
function TodoStore() { this.todos = {}; this.bindListeners({ handleAddTodo: TodoActions.ADD_TODO }); } TodoStore.prototype.handleAddTodo = function (todo) { var id = todo.id; this.todos[id] = todo; }; var todoStore = alt.createStore(TodoStore);
Sorry, something went wrong.
Question: would you prefer to use plain old javascript objects to define stores? You can use the ES3 module pattern with this approach:
(not in master yet)
https://github.com/goatslacker/alt/blob/a-fun-experiment/test/es3-module-pattern.js#L11
Hey @goatslacker,
Thanks for the reply, I can use it as reference for the other examples in the Readme.
I am using coffee-script + CommonJS/Browserify
No branches or pull requests
Hey there,
I am interested in using alt for my current project and at the same time have decided to not use ES6, are there any ES5 examples of using Alt?
Thanks.
The text was updated successfully, but these errors were encountered: