In video 20- Creating a Reusable API Client, Mosh goes over the following line in useTodos.ts when there is the white screen error
He says there is an issue with this (from the getAll method in apiClient.ts), that this loses it’s context and becomes undefined, like it is a stand-alone function, not a function that is part of an object. Fixes are to use bind() or to convert the getAll regular function to an arrow function.
I am wondering why there is this issue with this in the first place, because it is a callback?
Any links or explanations of why this is the case are appreciated. thanks