ParseReact icon indicating copy to clipboard operation
ParseReact copied to clipboard

Local Parse.Object after Create mutation

Open amccloud opened this issue 10 years ago • 3 comments

Is it possible to get access to the optimistic Parse.Object after a Mutation.Create?

amccloud avatar Jun 11 '15 09:06 amccloud

The flattened version of the created object should be passed to the Promise returned from .dispatch(), so you should just be able to chain a .then() onto that call.

andrewimm avatar Jun 11 '15 23:06 andrewimm

@andrewimm doesn't the promise resolve after the sync with the server is successful? I'd like to handle the newly created object optimistically.

amccloud avatar Jun 11 '15 23:06 amccloud

Ah -- I overlooked that bit. Let me think about this for a bit, and see if there's a reasonable way to implement this without having a subscription that watches all Objects of your specific ClassName

andrewimm avatar Jun 11 '15 23:06 andrewimm