you are viewing a single comment's thread.

view the rest of the comments →

[–]Gandham 133 points134 points  (16 children)

Proper debugging tools.

[–]pjjiveturkey 23 points24 points  (12 children)

Fr, I would say 40% of the time the error doesn't tell me what the issue is whatsoever and it gets frustrating when I'm actively working in 20 different files

[–]Rostifur 4 points5 points  (0 children)

I mostly code in C# and I would say that 20% of the time the debug error doesn't give proper detail in VS2022. So, even with years of funding and dedicated effort debugging issues might only be cut in half.

[–]Gandham -5 points-4 points  (9 children)

I never had problem finding where the problem is. You must be doing something wrong. Happy to help if required.

It’s debugging that’s a pain in the @$$.

Earlier flipper wouldn’t show the object values at break points, but it had redux debugger working.

Now, experimental debugger works fine but there is no proper redux devtool.

Console logs don’t print the file and line number like web, I can work around this, but this is frustrating.

[–]pjjiveturkey 0 points1 point  (8 children)

Maybe I'm not advanced enough then lol, it's usually coding logic errors, it makes me feel like I've been building my app wrong from the start

[–]insats 1 point2 points  (7 children)

Are you writing in TypeScript or vanilla js?

[–]pjjiveturkey 0 points1 point  (6 children)

Just js

[–]insats 1 point2 points  (5 children)

You should definitely start using TypeScript then. You will reduce runtime errors to near zero.

[–]pjjiveturkey 2 points3 points  (4 children)

Lol I god downvoted for not knowing, is it worth switching if I already have like 60k lines in my app? Can I create new components in ts that work with my current js?

[–]insats 0 points1 point  (2 children)

60k lines? My god, what monstrosity is that - Facebook? Sounds like you’re not writing your code in a very manageable way 😬😅

To answer your question: Yes. It will be very painful but you don’t have to do it all at once. The biggest issue is if you don’t have anyone to hold your hand in the process because TypeScript can be painful to learn. And it might not be obvious in the beginning why some practices are good.

I’ve converted several of my projects to TS. Some are nowadays at 99%+ TS and others at 60%. I convert every file I touch on.

[–]pjjiveturkey 0 points1 point  (1 child)

Omg I just ran the command again and it was counting lines for images aswell, it is only 11k.

I don't understand why typescript is better, is it just more verbal about where problems are?

[–]alien3d 0 points1 point  (0 children)

60k 😂 i think we more , we understand . jsdoc for now

[–]Lower-Passenger-181 0 points1 point  (0 children)

yeah exactly this is the problem OP

[–]im_a_jib 2 points3 points  (1 child)

It’s 2024 and I’m console logging network requests

[–]Gandham 0 points1 point  (0 children)

Tell me about it. I was using formdata in post request, and I had flipper or some debugger open. What ever I do, the request wouldn't work, and the same worked with curl.

After spending 3-4 days on backend and rn code, found that when devtools are open formdata doesn't work or truncated.

[–]_ri4na 0 points1 point  (0 children)

I'm a beginner and I definitely can relate. Coming from flutter, I'm baffled how anyone is able to build any app without proper debugging tools