Am I misusing mergeProps here?
I'm trying to get used to some of the features of SolidJS/SolidStart on this initial project and am running into an issue with
I've got this component that I'm building to serve as a very generic UI component:
Then I am importing and using the above component in a test page/route like so:
The problem is, when I try to merge the value of the
Am I doing something wrong here? Is the issue that the defaults have to also have default values for the other two attributes in order for a proper merge? (
The documentation that I read on the official site did show the basic syntax, but I feel like maybe this isn't the correct use case for this feature or I'm doing something wrong with it.
The idea is that I'm wanting to be able to pass a class name to the component and add it to the existing default ones. Maybe there's a better solution or one that's more correct that doesn't even use
Thanks in advance!
mergeProps().I've got this component that I'm building to serve as a very generic UI component:
Then I am importing and using the above component in a test page/route like so:
The problem is, when I try to merge the value of the
class prop with the defaults defined in the component, it doesn't work. Am I doing something wrong here? Is the issue that the defaults have to also have default values for the other two attributes in order for a proper merge? (
headerText and children)?The documentation that I read on the official site did show the basic syntax, but I feel like maybe this isn't the correct use case for this feature or I'm doing something wrong with it.
The idea is that I'm wanting to be able to pass a class name to the component and add it to the existing default ones. Maybe there's a better solution or one that's more correct that doesn't even use
mergeProps() to begin with?Thanks in advance!

SolidStart