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

str.replaceAll is not a function on react-native (Android) #928

Open
josej14 opened this issue Aug 29, 2024 · 1 comment
Open

str.replaceAll is not a function on react-native (Android) #928

josej14 opened this issue Aug 29, 2024 · 1 comment
Labels

Comments

@josej14
Copy link

josej14 commented Aug 29, 2024

Describe the bug

When the app is opened on Android and the user reach a screen where tanstack-form is used the app crashes because str.replaceAll is being called when the form is mounted. str.replaceAll doesn't exist without hermes enabled on React-Native

Screenshot 2024-08-29 at 14 37 09

Your minimal, reproducible example

Didn't have time to prepare a working example for a React-Native app

Steps to reproduce

  1. FieldApi.update is being called on mount the form
  2. getBy is called where str.replaceAll is used
  3. The app crashes

Expected behavior

The app shouldn't crash, I fixed the problem with polyfill but I think you could probably easily change the use of replaceAll to avoid this Android issue

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

  • OS: Android (React-Native)
  • Version: 0.29.2

TanStack Form adapter

None

TanStack Form version

v0.29.2

TypeScript version

No response

Additional context

No response

@josej14 josej14 changed the title str.replaceAll is not a function on react-native (Android only) str.replaceAll is not a function on react-native (Android) Aug 29, 2024
@crutchcorn
Copy link
Member

This is super helpful, thank you! We'll get this patched

@crutchcorn crutchcorn added the bug label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants