parse-community / parse-react

[EXPERIMENTAL] React, React Native, and React with SSR (e.g. Next.js) packages to interact with Parse Server backend
https://parseplatform.org/
MIT License
70 stars 27 forks source link

Is there a reason for this effort to exist? #107

Closed ninadpchaudhari closed 2 years ago

ninadpchaudhari commented 2 years ago

Genuinely curious, why does this exist? i know its experimental & alpha, but I am trying to understand the advantages of loading Parse this way from what I see here: https://github.com/parse-community/parse-react/blob/master/packages/parse-react/src/index.ts

The function is simply making Parse Global ( which some might argue is a bad idea). This abstracts the 3 lines of code, but breaks code completion as IDEs cannot see a Parse import statement on any other pages. Moreover, its opaque about what this actually does, Maybe we should add some more lines to docs that it simply initializes Parse & enables local storage. ( will be happy todo so ).

If we think this has to be done, at least we should return the Parse Object from here and then state in the usage section of the docs to set this Parse var as global so that the code remains testable?

mtrezza commented 2 years ago

I'm sure your observations make for an interesting discussion, and it's amazing that you are willing to give a hand and improve the docs. However, I'm closing this as it does not seem to be a Parse React issue but a general question / discussion.