The best way to reuse behavior is to import modules. Everything can be explicitly bound in the new scope.

It’s still a good idea to be aware of the concept of functional mixins. For example, when composing higher order functions in React, those functions can mix into props.

Also, Node middleware acts like functional mixins for the response object.

Being aware of those things and aware of the possible pitfalls (like prop collisions as you pointed out) is an important aspect of learning how to be an effective JS developer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store