Building components with Sage - like in React

I think wp acorn make:component TestComponent fits your question.