This is true about the notification potentially not being close to the action point - though the way I thought of it is that the user should know what action they just took therefore will understand the message they just got. Especially if the site uses this library throughout, the user will be used to this kind of feedback on their actions. It also makes it a bit more friendly for responsiveness as the developer doesn’t have to worry about placement or if the alert will fit on the screen properly.