-
-
Notifications
You must be signed in to change notification settings - Fork 209
Query without observe in react native #141
Comments
Also, it is hard to mutate without beeing able to execute a query.
|
Hi Klaus. We started using redux too, and we found that things got a lot easier when we dropped ParseReact and just use the vanilla Parse JS SDK. It's straight-forward to write Redux middleware that handles ParseQuery and ParsePromise as an action payload, so then you're just dispatching actions on the Redux store and write idiomatic Redux/React while still using Parse as your backend. If you look at the source code for the Thunk and Promise middleware for Redux, writing a middleware for Parse becomes obvious. Rick
|
I'm switching to redux too after reading about this. |
Thanks @RickDT - i think this will be my way. |
This is good to hear. I may do the same. |
@RickDT I was thinking the same thing. The only thing which bothers me is that I would want to include my extended subclasses of Parse.Object inside the redux store, but they are mutable and so aren't recommended. |
@DeDuckProject Technically, all JS objects are mutable if you're writing pure JS (not transpiled from something like Typescript). If you're going to adopt Redux, then it's just a matter of doing mutations by dispatching actions, rather than mutating the objects directly. Personally, I would reduce the Parse objects down to raw data in your state. We've done that and it works well. Essentially, the Parse SDK becomes a way of loading/sending data to/from the server. The project becomes more "Redux oriented" rather than "Parse oriented" however, so it's not a tradeoff to take on lightly if you're already very invested in Parse subclasses. |
@RickDT I see what you mean. Currently I'm using Redux with Parse in the following way: |
Hi,
I want to do a Query without the observable patern in react native. Just a query and execute. Like the mutations. Sadly I find no hint in the documation if this is even possible. :(
I need this, because I manage the state of my application via redux. Thanks
This is my little query:
The text was updated successfully, but these errors were encountered: