Implementing a word cloud with React

I actually had this come up as an interview question once, and it was more of a theoretical discussion on how I would implement it, as opposed to actually having me white board it/live code it. I thought it would be good practice to re-visit this and implement a quick...

The useRef hook: What is it and what does it do?

Hooks were introduced to React in late 2018/early 2019 when React 16.8 was released. They’re a way of getting away from traditional class components by replacing them with functional components but they still allow us to leverage React’s life cycle methods...

Replacing componentWillUnmount with hooks

tl;dr version using the useEffect hook: useEffect(() => { return () => console.log(“componentWillUnMount”) },[]) Hooks have REALLY grown on me as I continue to become more and more experienced developing with React. Gone are the days of needing to create...

What is Redux Thunk Middleware?

According to Wikipedia, a ‘thunk’ is: In computer programming, a thunk is a subroutine used to inject an additional calculation into another subroutine. Thunks are primarily used to delay a calculation until its result is needed, or to insert operations at...

Re-rendering a Child Component when Props Change

So typically a React component only re-renders when the state changes – but what if for some reason you want to have the component re-render when you pass it new props? Remember… State is local to the component, but props are passed down from the parent...