javascript

A collection of 9 post

Start with Vue 2 + Vuex 3 + Typescript Simple Boilerplate

Introduction If you read this post, you may have already heard that is not for , but for is. However, is almost 90% of the framework in the world. Furthermore, even today, and are still dominating the web, and it is like a moon to the users who migrate to or from the legacy framework. Even…

Refactor your code with axios.interceptors()

Introduction When you request the data from the server, we use the default . However, after the powerful ajax method emerged with Angular, there is enormous demand for like Ajax library for a non-angular framework. So, it is : the reason why people use it. In this post, I introduce the way I use…

When your image source not loading well... encodeURI() VS encodeURIComponent()

Introduction Sometimes we encounter URL problems because of special letters such as , , , blank space, and etc. In this case, we can apply some useful method: and . But, what’s the difference here? and encodes a by replacing reserved characters with their encoding. More specifically these…

Are You Still Use "+=" To Add Query Dynamically? Use URLSearchParams()!

Introduction We usually added query dynamically by using . However, it is not easily manageable when it comes to long query string. In this case, there is for easily manage the query dynamically. using It’s simple but you have to careful about or , matching. Becuase It is just string and you can…

Why is setTimeout(fn, 0) sometimes useful?

setTimeout(callback, time) is a JavaScript method you have to carefully use because it directly affects the browser or visible performance. Fundamentally, what does method stand for? from MDN, The method of the mixin sets a timer which executes a function or specified piece of code once the…

All You Need To Know About Event Loop (2)

Event Loop Let’s check the code above. Assuming the ‘waitForMessage’ function behaves synchronously. It means it runs an infinite loop and waits for a message, and if there is a message, process the next one. In other words, the is not a component of the engine, but manages which job to pile up…

All You Need To Know About Event Loop (1)

JavaScript Process One of the great features of JavaScript is that it is a single-threaded-based language. Single thread means that only one task can be processed at the same time. However, if you consider the environment in which JavaScript is actually used, you can see that a lot of work is being…

The Intermediate Guide to Console method with Your Browser

Introduction For everyone who can code, is the most famous method and basic method for debugging. It prints out the value from the location you want. However, you can expand the utilization of the method more. 1. console.log() this is the most basic one. It prints out everything inside the index…

Small Tips for adding DOM to List

1. AppendChild comment_list is so I thought worked here, but actually there was error coming out like this. What the heck is node? so I just tried different way, then came out result in a good way! so node means something like an object! not that but anyway I got this. But I don’t wanna…