parse-community / ParseReact

Seamlessly bring Parse data into your React applications.
https://parseplatform.org
Other
1.3k stars 209 forks source link

Cannot store an object without an Id #147

Closed mauriciord closed 8 years ago

mauriciord commented 8 years ago

I'm just using like the example, but show an error like:

Cannot store an object without an Id

My code:

import React from 'react';
import { Link }  from 'react-router';
import Navigation from './Navigation';
import { Parse } from 'parse';
import ParseReact from 'parse-react';

module.exports = React.createClass({
  mixins: [ParseReact.Mixin],
  observe: function(props, state) {
    return {
      loteamentos: new Parse.Query('Loteamento')
    }
  },
  render: function() {
    return (
      <div>
        <ul>
          {this.data.loteamentos.map(function(lot){
              return <li key={lot.id}>{lot.nome}</li>
          })}
        </ul>
      </div>
    )
  }
});

Why ? Using React Starterify (https://github.com/Granze/react-starterify) + Parse + Parse-React

jbbae commented 8 years ago

+1

mauriciord commented 8 years ago

still here

To solve the problem i'm using Parse REST at reflux !

mauriciord commented 8 years ago

Parse will retire !