replace deprecated transferPropsTo with Object.assign