Skip to content

📙 Notes for extending Parse.User #961

Open
@ngschaider

Description

@ngschaider

Link to section:
Parse.Object

What is the issue?
When extending Parse.User it is not very obvious, that the registerSubclass call does not follow the normal convention of passing the name of the subclass as a string followed by the subclass itself. Instead, the name of the class being extended "_User" is supplied. This is easy to overlook and also, there is no explanation of why it should be done differently here. In fact, this nearly lead me into creating an issue for the JS SDK after several hours of debugging and trying around...

Can you propose a solution?
Adding a paragraph (beginning with "⚠️") that points this out and maybe also explains the background why this is required.

Additional comments
Do I understand correctly, that the registerSubclass call is NOT used to add another JS type to be used for instantiating a Parse class but instead to overwrite which JS type is used for instantiating the Parse class "_User"?
The existence and use case for Parse.User.allowCustomUserClass should probably be explained here also.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions