For anybody wondering where the " self. " comes from in the login component (and getting error messages about it not being defined), above the post request there should be:
const self = this
Basically it is used to access " this " inside the promise.
(not sure how clean this is, though)
Yes, exactly. It was mentioned a line above in my full code, missed it (:
Anyone who visits the full repo can see the full code (:
Thank you for noticing this! I updated the gist and the post to use this instead, as(if I understand it correctly), when using arrow functions for .then callback this is not lost.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
For anybody wondering where the " self. " comes from in the login component (and getting error messages about it not being defined), above the post request there should be:
const self = this
Basically it is used to access " this " inside the promise.
(not sure how clean this is, though)
Yes, exactly. It was mentioned a line above in my full code, missed it (:
Anyone who visits the full repo can see the full code (:
Thank you for noticing this! I updated the gist and the post to use
this
instead, as(if I understand it correctly), when using arrow functions for.then
callbackthis
is not lost.