Content pfp
Content
@
0 reply
0 recast
0 reaction

Joe Toledano pfp
Joe Toledano
@joetoledano
In your apps, do y'all set up single components as single files or as files within folders? For example: ComponentName.tsx vs. ComponentName -- index.tsx
4 replies
0 recast
2 reactions

Carlos Matallín pfp
Carlos Matallín
@matallo.eth
components - ComponentName - ComponentName.tsx - index.ts - index.ts
2 replies
0 recast
3 reactions

Joe Toledano pfp
Joe Toledano
@joetoledano
Interesting, this may be a dumb question but what are the benefits of doing: ComponentName - ComponentName.tsx - index.tsx Vs. ComponentName - index.tsx
1 reply
0 recast
0 reaction

Carlos Matallín pfp
Carlos Matallín
@matallo.eth
No dumb question, there’s no silver bullet when it comes to project file structure. I think mostly for searching the file in the IDE
3 replies
0 recast
2 reactions

Carlos Matallín pfp
Carlos Matallín
@matallo.eth
There’s only one correct correct way to structure your React project https://x.com/dan_abramov/status/1027248875072114689
0 reply
0 recast
0 reaction

Joe Toledano pfp
Joe Toledano
@joetoledano
Ah gotcha, yeah this whole topic makes me think of this Dan Abramov post: https://x.com/dan_abramov/status/1042364018848145408?s=20
1 reply
0 recast
2 reactions

scottrepreneur pfp
scottrepreneur
@scottrepreneur.eth
The main advantage of the former is that you don't have a bunch of index.tsx labels across the open files. Having the actual component name and exporting from index gives the editor a bit more clean feel when jumping around open files.
1 reply
0 recast
1 reaction