Experimental
function Profile({ name, age, city }: {...}) {
...
}
const NewProfile = withSpread<"profile", "name" | "age" | "city">("profile")(Profile)
<NewProfile profile={{ name: "Some Name", age: 20, city: "Some City" }} />
// is equivalent to
<Profile name="Some Name" age={20} city="Some City" />
Generated using TypeDoc
Start receiving an object and spread all properties to Component
It uses the same mechanism as withDefaults but it could also have the same mechanism as withOverrides