Tip 45 | Make Simple AJAX Calls with Fetch |
In this tip, youâll learn how to retrieve remote data using fetch().
If you do any significant JavaScript app development, youâll have to interact with APIs. With APIs, you can get current information and update single elements without a page refresh. In short, you can create very fast applications that behave like native software.
Single-page web apps are part of the reason why JavaScript is so popular, but getting data with AJAXâAsynchronous JavaScript And XMLâused to be a hassle. It was such a hassle that most developers used a library, usually jQuery, to to reduce the complexity. You can see the documentation on the Mozilla Developer Network.[46] Itâs not easy stuff.
Now, thereâs a ...
Get Simplifying JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.