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...

3 mins read

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...

3 mins read

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...

3 mins read

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...

3 mins read

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...

3 mins read

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...

3 mins read

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...

4 mins read