It’s been awhile since I did any frontend work. Is there something that has taken jQuery’s place?

  • 𝒍𝒆𝒎𝒂𝒏𝒏@lemmy.one
    link
    fedilink
    arrow-up
    7
    ·
    11 months ago

    For me it’s the ability to set up a shared instance with the base request URL, and set headers for things like the user’s token, allowing all requests made with that shared Axios instance to be sent to the right path with the token without needing to define them for each individual request.

    To be honest though something similar can be done with spread syntax in the Fetch API’s options parameter