javascript - JurnalAnas

Avoiding Resource Leaks with the AbortController API

Learn how to effectively manage async tasks in your code and avoid common pitfalls such as improper error handling, excessive nesting, and failing to cancel unnecessary tasks.

Staying on Track with Code Refactoring

I encountered psychological barriers while refactoring a React app from JavaScript to TypeScript, and had to work on controlling my tendency to get sidetracked by disorganization or flaws in the code. I learned the importance of staying focused and sticking to the plan in order to avoid scope creep and unnecessary bug fixing.

React: What is useCallback Hook and When to Use It

One of the most important concepts to understand for optimizing React is memoization. Memoization is a performance optimization technique that eliminates the need to recompute a value for a given input by storing the original computation and returning that stored value when the same input is provided. Caching is a form of memoization.

macOS Big Sur: How to setup Node.js on Apple M1 Machine

Recently I bought an Apple's M1 Macbook Pro. As I am still transitioning from my old MacBook, it might be helpful to document some findings from the developer perspective, especially for developers working with javascript stuff on a daily basis like me.

State Management in Pure React: Thunks

In the previous post, we discuss about managing state in React's [class component](/pure-react-class), [Hooks](/state-pure-react-hooks), and a [data fetching strategy](/state-react-thunks). In this last part of the series, we are going to explore a Thunk and recap the series about implementing state management in pure React.

State Management in Pure React: Data Fetching

In the previous post, we discuss about managing state in React's [class component](/pure-react-class) and [Hooks](/state-pure-react-hooks). In this third part of the series, we are going to explore a data fetching strategy.

State Management in Pure React: The One with Hooks

Reducer is a function that takes two arguments, a current state, and an action, and demonstrates how to write a reducer function. With a reducer the state management of the state from the components rendering the the state.

State Management in Pure React: The One with Class Components

One of the hardest things in building a complex javascript application is a state management. It's why there are so many state management libraries available and more coming around every day. As applications get more complex, the big challenge in the web application is to tame and control the state. And let the main job of React is to just take your application state and turn it into DOM nodes.

Mengenal Progressive Web App

Malam itu Coco baru pulang kerja, dia sedang ada di kereta Commuter Line dari Jakarta ke Depok. Sambil mengisi waktu, dia biasanya bermain HP -- *ya, Coco adalah anak muda mainstream kekinian*.

Beberapa Hal tentang Vue.js

Hmm, kayaknya saya bakal pake Vue.js kedepannya untuk eksperimen-ekperimen yang lain.