React.js editable component (with factories)