Factory & Constructor Functions

What's the advantage of this hybrid approach?
class Component {
  constructor(config) {
    Object.assign(this, config);
  }
}

const componentFactory = {
  button: (props) => new Component({
    type: 'button',
    ...props,
    render() { /* render button */ }
  }),
  input: (props) => new Component({
    type: 'input',
    ...props,
    render() { /* render input */ }
  })
};
Next Question (20/20)