URLs building for the API'sIf you find yourself in this case: const API_URL = 'https://api.example.com/'; function getUserPosts(id, blogId, limit, offset) { const requestUrl = `${API_URL}/users/${id}/blogs/${blogId}/posts?limit=${limit}&offset=${offset}`; // send HTTP req...1 min read·electron.hashnode.devOct 14, 2020
JS Date management - date-fns.jsI think the time had come to drop moment.js. And when saying that is because I found something a bit more convenient and lightweight: https://date-fns.org/ And I like the API, which sounds as: const today = new Date(); console.log( lastDayOfMonth(to...1 min read·electron.hashnode.devOct 14, 2020
Vue and ReactHi all! I am a Vue.js ecosystem web dev, with 3+ more experience in Vue.js. I have started the tutorials of React.js with Mosh which explains very very well the library, and if it would be to compare the two so far, I would say the following. Note: ...2 min read·electron.hashnode.dev1AOct 14, 2020
Disable the autocomplete ChromeI get this annoying helping functionality of Google Chrome browser in what regards the forms: it auto-fills with predefined stored/cached data even if I specify clearly autocomplete="off/none" HTML attribute. There are cases when I really want the f...1 min read·electron.hashnode.dev1SOct 14, 2020
Recurring object properties - JSIf you ever get into troubles (and I'm sure you did) when trying to access a property of a JS object which does not exist twice, you will definitely get the red alert in the console. Example: const obj = {}; console.log(obj.foo.bar); In order to f...1 min read·electron.hashnode.devOct 14, 2020