-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should it work in IE11? #52
Comments
Ah, the reason that it does not work is because of this line: https://github.com/rehooks/local-storage/blob/master/tsconfig.json#L4 We simply need to change it to |
Cool! It doesn't seem to have major implications and it could be a nice change since Create React App doesn't transpile from ES6 any code in If you need help to search for implications, test or pr this, please let me know. |
Also hit this problem. Would you be open to a PR changing the target? |
This actually isn't as straight forward as I thought. There are types inside React (and I guess inside babel too from this output from
the final error is in the library and would be easily fixable using |
Ah, adding the following property should fix those errors: {
// inside tsconfig.json
"lib": ["es2015"]
} that way TS will create the shims for those too when specifying |
I tried to do this in
But it's not working and I'm getting following errors, I don't have any idea why. I'm not an expert of TS and found the relevant information here https://stackoverflow.com/a/42097465. @jharrilim Please let me know what I'm missing and I'll raise a PR.
|
Could we get a new release with this fix? |
I'm trying this hook (btw, thanks to all collaborators, an excellent work 👏 👏 ) and I found it doesn't work in Internet Explorer 11 and I don't even know if it's expected to work in such an old browser.
This is the crash I'm having in IE11:
It seems logic since IE11 doesn't support classes.
Here I created a clean example with Create React App to reproduce it: https://github.com/vasconita/rehooks-local-storage-issue-report
If this library is expected to support IE11 I can take a look later this week to try to solve it.
The text was updated successfully, but these errors were encountered: