I use ArcGIS API for JS 4.0 but I didn't find a widget to add a scalebar to my web application. So, I tried to use ArcGIS API for JS 3.16 which has a scalebar widget, but I don't know if it's a good idea to mix these different versions.
1 Answer
You can't mix the 3.16 scalebar into a 4.0 app.
You could either make your own scalebar or wait the for ScaleBar widget to be part of a future 4.x release. - See https://developers.arcgis.com/javascript/latest/guide/functionality-matrix/index.html