Posts Tagged #javascript

Every article on the Techalyst blog tagged with #javascript.

React Router: Routes, Params and Nested Layouts

React on its own has no concept of pages. The moment your app needs more than one screen with real URLs, back-button support, and shareable li...

2 mins read

JavaScript Array Methods and Vue Reactivity

Most of the work in a Vue app is shaping data before it hits the template. A list of products comes back from an API and you need the cheap on...

4 mins read

JavaScript Promises and async/await

JavaScript runs one line at a time, but network calls, timers, and file reads take time. Promises are how the language represents a value that...

3 mins read

Data Fetching in React with TanStack Query

Fetching data with useEffect works, but you end up writing the same things over and over: a loading flag, an error flag, a cleanup to ignore s...

3 mins read

Controlled vs Uncontrolled Components in React

Every form in React comes down to one question, and once you can answer it the rest falls into place: who owns the value in this input, React...

3 mins read

Closures and the Factory Pattern in JavaScript

Closures sound academic until you realise you use them constantly: every callback that remembers a variable, every module with private state,...

3 mins read

Memoisation in React: useMemo, useCallback and React.memo

React re-renders often, and that is fine, because a render is usually cheap. Memoisation is how you skip the renders and the calculations that...

3 mins read

useContext: Sharing State Without Prop Drilling

Prop drilling is the slow pain of passing a value down through layers of components that do not care about it, just to reach the one at the bo...

3 mins read

useReducer: Managing Complex State in React

useState is perfect for a few independent values. But when a component grows several pieces of state that change together, or transitions that...

3 mins read

Advanced Axios: Cancellation, Caching and Offline

Once you have a configured Axios instance, the next level is about responsiveness and resilience: cancelling requests that no longer matter, r...

3 mins read

Essential JavaScript Array Methods

Most day-to-day JavaScript is moving data through arrays: transforming it, filtering it, summing it, reshaping it. A handful of methods cover...

3 mins read

Arrow Functions and this in JavaScript

this is the part of JavaScript that quietly breaks more code than any other, and arrow functions are the tool that finally tamed it. The two a...

4 mins read

ES6 Modules: import and export

Before ES modules, splitting JavaScript across files meant leaky globals or awkward IIFE tricks. ES modules gave the language a real system: e...

4 mins read

Custom Hook Patterns and Best Practices in React

Writing a custom hook is easy. Writing one that stays clean as the app grows takes a few good habits. Rather than a list of tips, it helps to...

3 mins read

Custom Hooks: Extracting and Reusing Logic in React

The moment two components need the same stateful logic, fetching data, tracking the window size, a toggle with helpers, you feel the urge to c...

3 mins read

Props and Composition in React: children and Render Props

Components are only useful if they can talk to each other and slot together. React has a small, consistent set of tools for this: props send d...

3 mins read

The Rules of Hooks, and Why They Exist

There are two rules of hooks, and on first read they feel like arbitrary restrictions. Do not call hooks in conditions. Do not call them in lo...

3 mins read

Error Boundaries in React

By default, an uncaught error during rendering takes down your entire React app. One broken component throws, React unmounts the whole tree, a...

3 mins read

useState and How React Re-renders

useState is the first hook everyone learns, and on the surface it is simple: a value and a function to change it. What takes longer to click i...

3 mins read

useEffect: Effects, Cleanup and the Dependency Array

useEffect is the hook people reach for too often and understand too little. Its job is narrow: synchronise your component with something outsi...

3 mins read