amrlabib / react-timer-hook

React timer hook

Home Page:https://www.npmjs.com/package/react-timer-hook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

does not work in older browsers

dartess opened this issue · comments

Version: react-timer-hook@1.1.5

Browser: Safari iOS9.3

Problem: Safari does not fully support const from react-timer-hook/dist/index.js.

Please make a build for ES5 browsers?

Thanks @dartess for the issue, and sorry for my late reply.

I just published v1.1.6 it is built with babel to handle es5, so please try this version and let me know.

Just one question how did you import the package because if you import it in react using
import { useTimer } from 'react-timer-hook' the code should be bundled with react code right ? and it should work even if it was es6 because it will be transpiled with react

Yes, I use import { useTimer } from 'react-timer-hook'. And yes, it really looked weird, because my code and all other npm packages (quite a lot of them) are converted for old browsers correctly. Perhaps this problem is related to something else, but I did not understand what...

In any case, 1.1.6 works great. Thanks!