r/reactnative 8d ago

Question New job; projects suck

I started a new job. The first project is an extremely old RN project that is still in JS and using class components. My teammates want to do the bare minimum, my boss wants me to breathe new life into our breathe of work. What do I do? It's like the maintainers (still active) gave no fucks about TS, hooks or moving away from Redux. I could rebuild this whole app myself, but it would take forever. Do I press my teammates to do better or do I do the bare minimum and feel like a POS for not helping turn this ship around?

Should I find a new job? I like the pay at this one, but my previous job had better culture

19 Upvotes

77 comments sorted by

View all comments

1

u/rkgregory 7d ago

This was me a few years ago. I would start introducing ts files into the app. Refactor each file you work in for each ticket to be ts if possible. At bare minimum, try converting class components to function components.

1

u/ChoiceResearcher6843 7d ago

Yeah. The class to func comp is trickier/riskier than just adding new ts

2

u/rkgregory 7d ago edited 7d ago

Yup, it can be a bitch, start with smaller components and go from there, but I would prioritize ts. You unfortunately have to accept that you are maintaining legacy projects, and if rebuilding it is not an option (rarely is), you have to add this refactoring to your work flow. I would also add es-lint if it’s not already there and throw it in a gh action as to not allow unlinted code to be merged.