ParseReact icon indicating copy to clipboard operation
ParseReact copied to clipboard

Example on how to subscribe to result from cloud functions

Open kkgelu opened this issue 10 years ago • 4 comments

Me and my team are exploring React Native + Parse. We already have had Android and iOS apps on Parse. We want to rebuild them using React Native. We intentionally moved more code from the client to cloud and made the client thiner, hence lots of cloud functions.

We are very new to React. I couldn't find any examples on how to make React Native work with cloud functions. Basically I have a cloud function that returns a list of objects, I want to render the them in a list view. I only found this mentioned cloud function https://github.com/ParsePlatform/ParseReact/blob/master/docs/api/ParsePatches.md

I tried something like this:

  observe: function() {
    return {
      results: Parse.Cloud.run('recommendations', {page: 0})
    };
  },

I got error.

Can someone give an example. Thanks in advance.

kkgelu avatar Oct 14 '15 21:10 kkgelu

I have created a tag for SO: http://stackoverflow.com/questions/tagged/parse-react

Might be good to also ask on there and feedback here..

quantuminformation avatar Oct 17 '15 16:10 quantuminformation

:+1:

Tux1 avatar Jan 10 '16 05:01 Tux1

@kkgelu Did you get any answers for this over att stackoverflow? I'm interested myself.

cupofjoakim avatar Apr 21 '16 08:04 cupofjoakim

@cupofjoakim No. I checked the source code, this is not supported.

kkgelu avatar Apr 21 '16 21:04 kkgelu