Skip to content
Notifications
Clear all

Switched from Copilot to Cursor for a React Native team - what we lost

3 Posts
3 Users
0 Reactions
1 Views
(@data_pipeline_rookie_42)
Estimable Member
Joined: 3 months ago
Posts: 93
Topic starter   [#14904]

Hi everyone. I'm still pretty new to the data engineering side of things, but my team recently switched our primary coding assistant from GitHub Copilot to Cursor. We're a React Native team, and while Cursor is amazing for some things, we've hit a specific, reproducible failure case when it comes to refactoring our data-fetching logic.

The issue appears when we ask Cursor to help us switch from a basic `fetch` to a more robust library like `axios` or `react-query`. It often hallucinates method signatures or misinterprets the structure of our state management. For example, I asked it to refactor this simple component:

```javascript
export default function DataScreen() {
const [data, setData] = useState(null);
const [loading, setLoading] = useState(true);

useEffect(() => {
fetch('https://api.example.com/items')
.then(response => response.json())
.then(json => {
setData(json);
setLoading(false);
});
}, []);

if (loading) return Loading...;
return {data?.title};
}
```

The prompt was: "Convert this component to use axios instead of fetch, with proper error handling."

Cursor produced code that used `axios.get` correctly but then introduced a non-existent `axios.transformResponse` call inside the component, which completely broke the render. It also placed the error state in a strange, invalid hook call.

The correct refactor shouldn't invent new methods. It should look something like this:

```javascript
import axios from 'axios';

export default function DataScreen() {
const [data, setData] = useState(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);

useEffect(() => {
axios.get('https://api.example.com/items')
.then(response => {
setData(response.data);
setLoading(false);
})
.catch(err => {
setError(err);
setLoading(false);
});
}, []);

if (loading) return Loading...;
if (error) return Error fetching data.;
return {data?.title};
}
```

It's a small thing, but these little hallucinations make me nervous. I have to double-check every change it suggests, especially around APIs I'm less familiar with. Has anyone else found Cursor to be less reliable than Copilot for these kinds of straightforward, syntax-specific refactors? I'm worried about introducing subtle bugs into our data-fetching layer.



   
Quote
(@ethanm)
Trusted Member
Joined: 1 week ago
Posts: 46
 

I'm a marketing ops lead at a 30-person agency that builds client dashboards and mobile apps, so our React Native team uses coding assistants daily. We run Cursor in prod for most frontend work, after trying Copilot for about a year.

The main things we've noticed:
1. **Context handling** - Cursor keeps our project's conventions (like our specific API client wrapper) in mind across files better. Copilot felt more snippet-by-snippet.
2. **Refactoring reliability** - We see the same gap you do. When switching data-fetching patterns, Cursor sometimes invents prop names or misplaces hooks. We have to double-check those changes manually.
3. **Cost structure** - Copilot was a flat $10/user/month for us. Cursor's Pro plan is $20/month, but we needed it for the unlimited AI commands. That's a 2x jump if your team uses it heavily.
4. **Speed on common patterns** - For routine UI components (list views, forms), Cursor is faster because it references our existing component library. For logic changes, especially async or state updates, we still prefer manual edits with Copilot's inline suggestions as a safety net.

Given your React Native focus, I'd stick with Copilot if data layer refactoring is a frequent task. If you're doing more net-new screen building or copying patterns from your own codebase, Cursor's project awareness might outweigh its logic stumbles. To be sure, tell us how often you refetch vs. build from scratch, and whether your state management is mostly vanilla React or something like Zustand.



   
ReplyQuote
(@amelia2)
Estimable Member
Joined: 1 week ago
Posts: 67
 

Agree on the cost and refactoring points. We saw the same thing when moving from fetch to Axios - Cursor would insert `.then()` chains in the middle of async/await functions from our codebase. Had to lock that pattern down in a PR template.

The context handling is a double-edged sword. It's great for our UI library, but it also means Cursor will sometimes reinforce a bad pattern if it's repeated enough in the repo. Copilot's "dumber" snippets forced us to think more.


Ship it, but test it first


   
ReplyQuote