-
Notifications
You must be signed in to change notification settings - Fork 340
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
Add README instructions for polyfilling atob #242
Merged
Merged
Changes from 3 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4c5a9dd
Add README instructions for polyfilling atob
frederikprijck fe873ab
Update README.md
frederikprijck a5dbb0e
Update README.md
frederikprijck 4d4b319
Update README.md
frederikprijck 4507e79
Update README.md
frederikprijck c295cd7
Update README.md
frederikprijck d72a1f6
Revert "Update README.md"
frederikprijck 662625e
Merge branch 'main' into frederikprijck-patch-1
frederikprijck 5b6e77b
Update README.md
frederikprijck e53a6b6
Merge branch 'main' into frederikprijck-patch-1
frederikprijck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does React Native have support for
globalThis
? That might be preferential here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on your investigation, I am considering reverting this and only recommend using the core-js/stable/atob, or whatever polyfill works for the platform of choise. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better, I wonder if we should also just recommend base-64, which has been succesfuly used here: https://github.com/techmatters/terraso-mobile-client/pull/567/files
The benefit of base-64 is that it's created by an active and well-known person, so I am confident. It also has 0 dependencies, so even though it hasnt had any release since 2020, I do not think there is any reason to cut releases and it shouldn't mean it's a package to avoid.
jwt-decode was just as stale before we cut the new major, for the same reason. There was no reason to cut any release for it.
Even more so, based on the messages in this PR, I am leaning towards only mentioning base-64 in the readme. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base-64
LGFMThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the PR to only mention base-64. LMK what you think. I tried this in your sample app @jonkoops and it seems to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the repo on base-64 does look kinda stale. We can go with both core-js and base-64 and see if any issues arise and remove the recommendation of base-64 if that's the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a fine solution @frederikprijck. I am hopeful Hermes might eventually implement this feature, so we might be able to remove this in the future sometime.