3

Is there any way to generate component in React from command line (similar to Angular's ng generate)?

2

A react component is just a .tsx file. So just add a new file, give it a .tsx extension, copy an existing component's code, change its class name and fill out the props and implementation.

I'm not aware of any way to generate it, but i don't really think it's necessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.