Recent Posts

Building a React File Upload Button to Parse JSON and YAML
Handling file uploads in a React app is straightforward, but things get more interesting when you need to filter for specific file types and parse their contents. I needed to create an upload button that only accepted JSON and YAML files, then read and displayed their contents in the browser. Here’s how I did it.

Making the Storybook Preview Full Height
When working with Storybook, I wanted my component previews to take up the entire viewport height. But by default, the preview area doesn’t always stretch to fit the full screen. After trying a few different approaches, I found the simplest and most reliable way to achieve this. Here’s how to make sure your Storybook preview

Adding Adaptive Cards to a React App with Markdown Support
When I started working with Adaptive Cards in a React app, I wanted a way to dynamically load and style cards while keeping them flexible. Adaptive Cards provide a powerful way to render dynamic UI elements using JSON, but by default, their Markdown support is somewhat limited. To improve this, I decided to integrate markdown-it,

Fixing the the inferred type of ‘meta’ cannot be named rrror in Storybook
When I first encountered the “The inferred type of ‘meta’ cannot be named without a reference to…” message in Storybook, I was caught off guard. I wanted a quick solution that would keep my TypeScript checks happy and my Storybook setup running smoothly. After a bit of trial and error, I discovered a simple fix

Solving Cannot Find CSS Module Errors in Typescript
I remember feeling puzzled the first time my TypeScript compiler complained about an imported .module.css file in my React code. Everything worked at runtime, but VSCode kept throwing red squiggles. To avoid confusion, I decided to create a quick fix that put an end to these errors. Cannot find module ‘./MyComponent.module.css’ or its corresponding type

Tackling the useNavigate Error in Storybook
I recently ran into an error in my Storybook environment that read: useNavigate() may be used only in the context of a component. It took me a moment to understand why this was happening, and I want to share how I solved it. Error: useNavigate() may be used only in the context of a component.