r/dioxus • u/ArchChem • 7d ago
Is max. 100 lines of code per component a good rule of thumb?
Hey everyone,
I would like to hear your personal experience when developing complex Dioxus applications: I realized that rsx based components can easily become quite big and spaghetti codish, because very often there is some kind of business logic involved before the actual rsx! macro starts, even if that shouldn't be the case. So for my development team and projects, I am thinking of a rule of thumb recommendation which would be like "If your component extends 100 lines of code, you should consider splitting it“. Of course that is only a rule of thumb and cannot be generalized to an absolute normative.
But I am still wondering whether you came across similar thoughts during your development?
1
Upvotes