If someone want to merge default value and real value
What problem does this feature solve?
when i do coding work if find one problem very unconvinent. when the parent dom transfer props to child dom, if i want to transfer an object,but some property is empty, i cannot use the default value instead .
What does the proposed API look like?
such as this problem, i use props but lack of property,only transfer title prop,but lack of width prop, what i want is to merge width prop as default but use title prop as i transfered
that is what i want ,i want to merge real value and default value , even if real value lack of some property
It can be solved in userland with a computed property and a deep-merging function (e.g. defu).
It can be solved in userland with a computed property and a deep-merging function (e.g. defu).
it is solved my problem already tks. but i need to import new lib defu , althought it is worked , but need to define a new variable. what if we handle this logic in props? maybe we can integrate defu's main logic in props function?