In Mx 7 you had “Custom widgets”, which are using Javascript.
In Mx8 “Custom widgets” are still available, but also came along the Pluggable widgets, using the Javascript framework React. Your choice between these two is easy:
Also Mx8 introduced Pluggable Native widgets, which use React Native, so use this native variant if you need the phone’s camera, gps etc.
See for more trustworthy info https://docs.mendix.com/howto8/extensibility/