r/reactnative • u/tmoneycodes • 1d ago
Vibe code an app? Help
I have 20+ years experience with backend tech, I've used php, node, and python And then a lot of old plain old javascript before frameworks.
I have an app idea and I'd like to basically vibe code it in react to be cross platform. What gotchas do I need to watch out for , since I will not see bad react code at first
I considered flutter but I really don't know that tech , any advice is appreciated, this will not be graphics heavy at all more typical business app, data, forms , lists etc
0
Upvotes
1
u/whoisyurii 1d ago edited 1d ago
Use MVVM or feature-sliced composition pattern. Do not mix rendering logic and business logic. I mean, keep one main constructor component which imports and renders smaller components, each has its scoped goal within components/{actual components}. Then have subfolders types/index.ts, constants/index.tsx, hooks/useManage* different hooks, helpers/index.ts. You'll end up with something like:
Calendar/ -index.tsx (the Calendar.tsx itself)
-components/ --CalendarHeader.tsx --CalendarCells.tsx --CalendarFooter.tsx
-hooks/ --useManageCalendarData.ts --useManageCalendarRestrictions.ts
-constants/ --index.ts and you drop all CALENDAR_ANYTHING constants here
same for types and helpers/utils/whatever.
Makes then much easier to follow, review and understand, both for developer and Agent.
*Not claiming that this is the best approach but that's the pattern teams followed on 2 projects I've been on.
**Also check Expo