TanStack / form

🤖 Powerful and type-safe form state management for the web. TS/JS, React Form, Solid Form, Lit Form and Vue Form.
https://tanstack.com/form
MIT License
3.77k stars 340 forks source link

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

Open josej14 opened 2 months ago

josej14 commented 2 months ago

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

TanStack Form adapter

None

TanStack Form version

v0.29.2

TypeScript version

No response

Additional context

No response

crutchcorn commented 2 months ago

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