DEV Community


Discussion on: Need Opinions

akanksha_9560 profile image
Akanksha Sharma Author

Very good points :), but what would be the circumstances we would use inheritance?

sharlaan profile image
Raphaël Morineau

Honestly i never felt the use for it, either in front nor in a Node backend.

A usecase where inheritance could be useful would be, in a big NodeJS-based backend, to create a custom module from another module so you could extend it with your custom methods.
Best example coming to my mind is NestJS, check it out.