live-example: https://jsfiddle.net/GrafSonne/69z2wepo/75615/
hover over the text on IE and it works like expected, but throws an error. ("Symbol" is undefined)
not just IE, but also on Safari 9.1 :)
Seeing the same error in Safari 9.1. It looks like the issue is with this line (compiled version)
babel-runtime is used to create the compiled/standalone JS of this library. Right at the top of the babel-runtime docs, it points out the caveats to using it:
NOTE: Instance methods such as "foobar".includes("foo") will not work since that would require modification of existing built-ins (Use
babel-polyfillfor that).
I tried using this with babel-polyfill, and can confirm that it fixes the issue.
However the issue with babel-polyfill is that it modifies globals, which isn't recommended for a library since this mutates functionality outside the scope of just the library.
Knowing this, I see two options:
shouldn't this be fixed in react-tooltip instead of us using additional libraries ?
So i found this https://github.com/zeit/next.js/issues/2060
and i imported into my wrapper of React-tooltip the core-js library. seems to fix this.
Hi, just sharing ways that worked for me:
1) Include <script src='https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.23.0/polyfill.min.js' /> in header - quite bad option, It's huge.
2) Add import 'babel-polyfill'
3) Add
import "core-js/fn/symbol/iterator"
import "core-js/fn/symbol"
Most helpful comment
babel-runtimeis used to create the compiled/standalone JS of this library. Right at the top of the babel-runtime docs, it points out the caveats to using it:I tried using this with babel-polyfill, and can confirm that it fixes the issue.
However the issue with babel-polyfill is that it modifies globals, which isn't recommended for a library since this mutates functionality outside the scope of just the library.
Knowing this, I see two options: