I have used this before and it worked well.
const isIEOrEdge = /msie\s|trident\/|edge\//i.test(window.navigator.userAgent)
I have used this before and it worked well.
const isIEOrEdge = /msie\s|trident\/|edge\//i.test(window.navigator.userAgent)