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

[Docs] Can't locale "useIntlJsc" in RN 0.64 #139

Open
dlebedynskyi opened this issue Dec 9, 2020 · 3 comments
Open

[Docs] Can't locale "useIntlJsc" in RN 0.64 #139

dlebedynskyi opened this issue Dec 9, 2020 · 3 comments

Comments

@dlebedynskyi
Copy link

Issue Description

Documentation say

International variant
For React Native version 0.60 and newer, your build.gradle should have a flag to enable this feature.
....
-  def useIntlJsc = false
+  def useIntlJsc = true

I'm not seeing any useIntlJsc in default RN 0.64 release.
Used - https://github.com/facebook/react-native/releases/tag/v0.64.0-rc.1
Template created as npx react-native init RN064 --version 0.64.0-rc.1

I do however see following

// android/app/build.gradle


/**
 * The preferred build flavor of JavaScriptCore.
 *
 * For example, to use the international variant, you can use:
 * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
 *
 * The international variant includes ICU i18n library and necessary data
 * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
 * give correct results when using with locales other than en-US.  Note that
 * this variant is about 6MiB larger per architecture than default.
 */
def jscFlavor = 'org.webkit:android-jsc:+' // 

Is documentation just incorrect or is there some other place that requires update?

@lorenzoangelini
Copy link

@dlebedynskyi Does the release version crash for you too?
RN 0.63.4 with Hermes enabled -> ok
RN 064 --version 0.64.0-rc.2 with Hermes enabled -> ko
RN 064 --version 0.64.0-rc.2 with Hermes disabled -> ok

@dlebedynskyi
Copy link
Author

@lorenzoangelini apologies for later reply.
I think this is a docs issue.
I was able to use org.webkit:android-jsc:+ and Intl worked fine

@frankfuu
Copy link

frankfuu commented Nov 14, 2021

I had to add/update def jscFlavor = 'org.webkit:android-jsc-intl:+' in the file android/app/build.gradle for me to be able to use functions like Intl.NumberFormat on Android. I'm using RN 0.66.

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

3 participants