Skip to content
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

Conditional exports and react native #112

Closed
SimonAM opened this issue Feb 4, 2022 · 1 comment
Closed

Conditional exports and react native #112

SimonAM opened this issue Feb 4, 2022 · 1 comment

Comments

@SimonAM
Copy link
Contributor

SimonAM commented Feb 4, 2022

15% of mobile apps are built using react native. And react in general seems to inspire people to delve deeper into functional programming.

However, react native doesn't like the way fp-ts-std implements conditional exports.
If i can decipher the expo teams response on this issue, its due to the use of regex expressions in fp-ts-std.

Can someone explain what is the thing that creates the incompatibility and what would need to be changed in fp-ts-std?

@samhh
Copy link
Owner

samhh commented Feb 6, 2022

On conditional exports you can usually patch in support in unsupported environments, per their example and with Jest. This is an Expo issue.

Regarding their mention of unicode property escapes, I think they're referencing the implementation of for example isAlpha (the \p{Alpha} bit). This is an ES2018 feature that supposedly the React Native JS runtime doesn't support yet. All modern web browsers and Node >=10 support it, including Safari which I believe uses the same underlying JS engine. As for why React Native/Expo doesn't seem to support it yet I can't offer any further insight, it's not an ecosystem I'm familiar with.

@samhh samhh closed this as completed Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants