React Native support is dropped #98
Description
Describe the bug
The TextEncoder/TextDecoder reference errors occur on React Native environment because the environment doesn't provide them.
The multibase package drops the RN support at the version 4.0.3 release when it stops depending on the web-encoding library.
These APIs are provided by the web-encoding package on the RN environment from its 1.1.0 version release.
To Reproduce
Steps to reproduce the behavior:
Prerequisite: React Native development environment
npx react-native init MultibaseIssue98App
(create a React Native project)yarn add [email protected]
- use this package (example: somay/MultibaseIssue98App@6bf7e62 )
yarn ios
oryarn android
(Run the application on mobile devices or emulators)- Get the error message on console:
ERROR ReferenceError: Can't find variable: TextDecoder
This repository is the result of the above steps' 1 to 3: https://github.com/somay/MultibaseIssue98App
Expected behavior
Able to use them.
Smartphone (please complete the following information):
- Android (emulator of Pixel_3a_API_30_x86(AVD) - 11) and iOS applications (emulator of iPhone 12 - iOS 14.5)
Additional context
This PR actually removed web-encoding: #89
I'm grateful if you resume to support React Native even if such universality of this package actually isn't intended by the maintainers.
The web-encoding library intentionally starts to support the React Native platform in order to help RN developers use libraries depending on web-encoding such as multibase and uint8arrays.
I currently works on a domain (the decentralized identity domain) where this kind of support is quite helpful because many libraries providing core functionalities in this area are implemented in Javascript although it's very important to provide users with mobile applications.