Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Normal example ParseReact and ES6 #176

Open
arg2u opened this issue Jun 16, 2016 · 3 comments
Open

Normal example ParseReact and ES6 #176

arg2u opened this issue Jun 16, 2016 · 3 comments

Comments

@arg2u
Copy link

arg2u commented Jun 16, 2016

Pls can u give us good example with observe() in es6 pls?

@meilers
Copy link

meilers commented Jun 16, 2016

@arg2u
Copy link
Author

arg2u commented Jun 16, 2016

Yes, it good example with Es 2015, but in Es 6 using ParseReact.Component not work. And now I need ecmascript example with work code. I use webpack + react

@marcusfelix
Copy link

var Parse = require('parse').Parse;
var ParseReact = require('parse-react');
var React = require('react');
var ParseComponent = ParseReact.Component(React);

export default class TodoList extends ParseComponent {
  observe(props, state) {
    return {
      items: new Parse.Query('TodoItem').ascending('createdAt')
    };
  }
}

The ToDo app in demos folder is a good example of ParseReact + ES6
https://github.com/ParsePlatform/ParseReact/tree/master/demos/todo

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants