A lot of jQuery’s features are now available in native JS - would also suggest just using native JS anyway because jQuery won’t throw any errors into the console if a selector matches no elements etc.
The only additional library I’ve needed recently for (personal work) is Axios for requests - easier than working with the Fetch API in some cases
Axios for requests - easier than working with the Fetch API in some cases
May I ask what cases? I used to use Axios on Node, before they implemented the fetch API over there but I haven’t touched it since. And defintiely never used it on the client. Could you make an example of some case where it’d be easier to work with Axios than with fetch?
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
A lot of jQuery’s features are now available in native JS - would also suggest just using native JS anyway because jQuery won’t throw any errors into the console if a selector matches no elements etc.
The only additional library I’ve needed recently for (personal work) is Axios for requests - easier than working with the Fetch API in some cases
May I ask what cases? I used to use Axios on Node, before they implemented the fetch API over there but I haven’t touched it since. And defintiely never used it on the client. Could you make an example of some case where it’d be easier to work with Axios than with fetch?
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