fullstack-hy2020 / fullstack-hy2020.github.io

https://fullstack-hy2020.github.io
Other
1.52k stars 3.83k forks source link

Use `fetch()` global function for http-requests over `axios`-library #3203

Open kahlstrm opened 10 months ago

kahlstrm commented 10 months ago

Given that fetch is available on all modern browsers and has been for quite many years, I wonder if there are any blockers in adapting the material to use that over the axios-library? Is there a pedagogical reasons for using axios over the standard fetch, or is this just a remnant of the past when fetch wasn't widely available?

I'd argue that fetch is currently the de facto method for making HTTP-requests on the browser (and node), and would be a more practical API to learn over axios.

If this is something that is deemed a good idea, at some point in time I could contribute with PRs changing the Finnish and English materials and starter templates to use fetch. But anyone else is also free to contribute and pick this up.

mluukkai commented 10 months ago

This is a good point. I'll consider this change for the 2024 edition!