4 Reasons I Use Cursor

date
Sep 19, 2024
slug
4-reasons-i-use-cursor
status
Published
tags
Hard Skills
summary
A few ways I am using this awesome IDE.
type
Post

Introduction

As mentioned in the title, this post is about 4 reasons why I use Cursor. That is: 4 reasons why within the context of frontend development for React apps. If you’re not familiar with Cursor, checkout their site here. The reason I am writing this is because Cursor is one of those tools that has absolutely changed the game for me.
I am now able to move considerably faster and with more confidence. Ultimately, this is the main reason why I use it — to be able to build quality software more efficiently. I could stop the post right here.
However, it’s well worth the deeper dive to see some of the reasons why. Note, this does not include all the reasons — just the top ones.
Disclaimer: I have no association to the company. I recently started using it a few months ago.

#1 Generating Mock Data

One of the things we do in our line of work is write tests. In the FE, this often involves creating mock data. This can often be simple enough if you have an object with a handful of properties.
Example:
 
notion image
However, more often than not, we’re working with complex data structures that essentially come from some backend. And, these objects often have nested objects.
Minor example:
notion image
 
Really, where I use this is when looking at complex interfaces that come from being generated from our API.
Here’s a real world example:
notion image
Here’s my prompt and its answer:
notion image
I just hit the copy button and bam, we are in business. And, my time for generating mock data went from 5, 10 or 15 minutes down to like 1 minute, if that.

#2 Writing Tests

This is tied to point 1. Mock data is for tests, after all.
I’ve used Cursor for writing unit tests and integration jest tests for TypeScript functions and React components.
Let’s say I have this function:
notion image
 
I simply do the following:
notion image
While writing unit tests for a case like this may take 5 or 10 minutes, it now takes me 5 seconds. 😃

#3 Patterns, Patterns, Patterns

When facing a problem, often times, we can have multiple ways to accomplish the goal. One of things I love to do is to just type out all of my approaches for a specific problem. These approaches often involve different patterns.
Examples:
  • Use form library versus useReducer
  • Context versus some other mechanism
  • Etc.
I use it to do really do two things:
  • Get ideas for what implementations would look like one way versus another
  • Get feedback on whether or not something I am working on crosses into anti-pattern territory
This feedback very often involves getting the downsides to said patterns. This is where the power comes in.
It’s like having a coworker right next to you who can give you well articulated feedback on your work in real time. UNREAL!

#4 Tab Complete

This by far is my favorite feature. Their tab complete is OUT OF THIS WORLD. When you’re working on something, it seems like the tool can read your mind. That is how good it is.
It’s so good at picking up your patterns, patterns of the codebase, and suggesting some code for you.
I don’t have real examples handy for you, but if you ever get a chance to use it, you’ll see what I am saying.
From import statements, writing comments, to writing actual source code, it’s extremely powerful.

Conclusion

This is not an exclusive list by any means. But, it’s one that contains some of my favorite reasons why. What are some of your favorite reasons?

© Bryan Guillen 2023 - 2025