probably a bit of a silly question but I’m only a beginner and there’s something I am trying to understand properly.
When we have code like this:
const { userName } = await getUserProfile({ userId });
What exactly is happening here? Are we destructuring userName out of the getUserProfile object to be able to access that property? And does userId mean that the getUserProfile function has a parameter that is an object that has a property userId?
Sorry, if this is too beginner of a question but would really appreciate it if anyone had the time to explain this to me please.