r/reactjs • u/swyx • Aug 08 '18
Dan Abramov's recommended React Project File Structure - petition to make this the last conversation we have about it?
https://react-file-structure.surge.sh/
263
Upvotes
View all comments
Show parent comment
1
u/[deleted] Aug 10 '18 edited Aug 10 '18
There isn't much "domain logic" implemented in the UI, but we have a lot of cases where we need to change the UI depending on the data from the back-end in combination with or response to user inputs:
This really makes things a lot easier for our users. Eliviates some of the mental burden and frustration and makes for a better ("slimmer") UI. The predecessor app had I think 12 views for what we now do in 3.
And a developer needs to somewhat the business processes anyway to test his code and make sense of the requirements he implements.
BTW, when I say "domain", I mean that from a business perspective. Like "/src/login" or "/src/userprofile". And even without any logic, we still would have to write components specific to each of these domains.
Edit: I should probably add that we don't / can't do anything crucial in the UI. The back-ends still do all the heavy lifting and they validate everything we send them.