Posts Tagged #javascript
Every article on the Techalyst blog tagged with #javascript.
State Management in React: Context, Redux Toolkit and Zustand
State management in React gets talked about as if you need a big library on day one. You usually do not. Most state is local and stays that wa...
useRef: DOM Access and Mutable Values in React
useRef looks like it does two unrelated things: it grabs DOM elements, and it stores a value that does not cause re-renders. They are actually...
Axios: Instances, Interceptors and Error Handling
Axios is the workhorse HTTP client for the browser. You can fire a one-off axios.get(...) anywhere, but the moment an app has more than a coup...
Portals in React with createPortal
Modals, tooltips, and dropdown menus all share a problem: they need to break out of wherever they are declared in the DOM. A modal nested deep...
Immutable State Updates in React
One rule causes more "but I changed the state, why didn't the UI update" bugs than any other in React: never mutate state, always re...
Conditional and List Rendering in React, and Why Keys Matter
Two things show up in almost every component: deciding whether to show something, and rendering a list of things. React has no special templat...
JavaScript Scope, Hoisting and References
A lot of confusing JavaScript bugs trace back to three fundamentals: how variables are scoped, when they come into existence (hoisting), and w...