Performance: Multiple Components or Dynamic Fields?

I’m looking for opinions on structuring a certain part of my app. It has a number of different forms that get filled out and then sent to AI in a prompt. Most of the forms will have many of the same fields as others but with 1 or 2 fields being added, but the prompt in the backend is very different.

Option #1 - the way I’m leaning
Have each different form as a component and use conditional rendering to show the component based on what the user is doing.

I’m thinking this will be easier for debugging and improving on them over time, even though may of the components will be 80% similar.

Option #2
Have all of the potential fields that could need to be filled out (could be 20 - 30) and show or hide them based on the form that needs to be shown.

I’m thinking that this could cause issues because if something ever goes wrong with 1, it could break them all.

I’m interested in hearing your opinions!

Hi @mark ,

Option 1 could work (I’d say ONLY) when controlled by a table in the backend. Otherwise option 2 is definitely better manageable (better visible in Weweb +in case of errors symptoms are usually better isolated).

And perhaps you can consider an option 3 where you do a partial grouping into - lets say - 5-6 forms.