That it would, yep. Also think about the contract of you component, so to say.
I think you are adding an additional, not necessary layer in the middle, the reading patterns of the code would be as following:
Component usage -> Wrapper Object definition -> Value definition
vs
Component usage -> Value definition
I am usually reluctant to bring in any indirection if it doesn't have great value to add to the code.
My 2 cents,
Ale
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That it would, yep. Also think about the contract of you component, so to say.
I think you are adding an additional, not necessary layer in the middle, the reading patterns of the code would be as following:
Component usage -> Wrapper Object definition -> Value definition
vs
Component usage -> Value definition
I am usually reluctant to bring in any indirection if it doesn't have great value to add to the code.
My 2 cents,
Ale