Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.
This repository was archived by the owner on Aug 24, 2021. It is now read-only.

React Native support is dropped #98

Open
@somay

Description

@somay

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

  1. npx react-native init MultibaseIssue98App (create a React Native project)
  2. yarn add [email protected]
  3. use this package (example: somay/MultibaseIssue98App@6bf7e62 )
  4. yarn ios or yarn android (Run the application on mobile devices or emulators)
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions