-
-
Notifications
You must be signed in to change notification settings - Fork 210
ParseReact breaks Parse.User.logOut() #161
Comments
+1 ParseReact is seriously in question now with Parse shutting down. Plus, this repo has many issues and no attention for months now. I would recommend migrating away from ParseReact. React is a great platform but unfortunately Parse integration with React is no longer a viable reality. https://github.com/angular/angular |
Shortly after encountering this issue, which was sort of the final straw for me, I moved away from Parse-React and haven't looked back. It wasn't difficult. Instead of using the Parse-React style local subscriptions, I just created a flux-style Store per data type and have each of my React components subscribe to them. Problem solved. The other thing that was killing me about Parse-React was that I had two completely different data types floating around in my app: Parse Objects and whatever object type Parse-React subscriptions produced. |
Thanks for the feedback! That sounds like a viable solution for me as well. @lrettig |
@lrettig: same here, it's unfortunate, but I'm moving away from parse-react as well. @thewizster: with parse-server, Parse integration in React is still viable! |
Oops, same here, we are doing React Native. Can repro on some devices, users just can't sign out at all. Large part of the app already built with ParseReact, some workarounds would be appreciated before I rewrite the parts.... |
@kkgelu you could try disabling A+ compliance on parse promises. That's an option but it's enabled by default now. Note that I haven't tested this. |
@lrettig yeah, don't brother. I started making my flux stores, I am also having the other issue of Parse objects vs. ParseReact-ed objects, frustrating... |
bien |
ParseReact (0.5.0) patches
Parse.User.logOut()
(Parse 1.6.14) like so:Unfortunately, this breaks logging out since
LocalSubscriptions.currentUser.update()
runs beforeoldLogOut()
has finished and its promise has resolved. It callsParse.User.currentAsync()
-- which returns the still logged-in user -- and then on line 97 it callssetCurrentUser(current)
which undoes the log out and logs the user right back in.This it's impossible to log out the Parse user using
Parse.User.logOut()
with ParseReact installed. Help!Important note: this bug only appears to manifest when A+ compliance is enabled on Parse Promises by calling
Parse.Promise.enableAPlusCompliant()
--apparently because of this difference:(cf. http://stackoverflow.com/a/31223217/2397068)
However, enabling A+ compliance should not break this, and besides the Parse team intends to migrate all promises to A+ compliance (cf. parse-community/Parse-SDK-JS#57) so I think this does need to be fixed.
The text was updated successfully, but these errors were encountered: