4 ms·
Ouch. I've been building dynamic components using transferPropsTo(), which is now deprecated. It's very flexible and working well, so I'm a bit bummed to see it
by xiaoma 12y ago
Ouch. I've been building dynamic components using transferPropsTo(), which is now deprecated. It's very flexible and working well, so I'm a bit bummed to see it go.
render: function() {
// after building up some object, propsObj that is determined by state
return this.transferPropsTo(
Component(propsObj)
);
}
- lobster_johnson 12y agoNo problem, just do this instead: render: function() { // Assign propsObj here return <Component {...propsObj}/>; }