SolidJSS
SolidJSโ€ข3y agoโ€ข
3 replies
SilentRhetoric

mergeProps deeply?

How deeply does merge props actually merge objects? Could I do?

const merged = mergeProps(
  defaultsObj: {
    key1: defaultValue1,
    key2: defaultValue2
  },
  props
)


where props has a props myObj with the values I want to default?

{
  myObj:{
    key1: value1,
    key2: value2
  }
}
Was this page helpful?