Description
I have hermes enabled in my iOS project and trying to execute following code snippet,
let testCall = () => this.testCall();
let funct = '{() => testCall()}'; // function in string format
let finalFunc = eval(funct);
Now, If I execute the finalFunc() then am getting following error,

But if I I execute the finalFunc() when hermes is disabled then testCall() function is called successfully.
Note: In Android there is no issue no matter hermes is enabled or disabled.
Version
0.67
Output of npx react-native info
System:
OS: macOS 11.6
CPU: (8) x64 Apple M1
Memory: 40.87 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.22.1 - /usr/local/bin/node
Yarn: Not Found
npm: 6.14.12 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.2 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7351085
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.10 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.0 => 0.67.0
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps to reproduce
- Kindly clone the reproducible demo
2.Once the project is ran you will be able to see a text called 'Button'
3.Just tap on the button then you will face the error which is in above screen shot
Snack, code example, screenshot, or link to a repository
Please find the reproducible demo here - -https://github.com/Yandamuri/Test-Hermes-In-IOS
Description
I have
hermesenabled in myiOSproject and trying to execute following code snippet,Now, If I execute the
finalFunc()then am getting following error,But if I I execute the
finalFunc()whenhermesis disabled thentestCall()function is called successfully.Note: In
Androidthere is no issue no matterhermesis enabled or disabled.Version
0.67
Output of
npx react-native infoSteps to reproduce
2.Once the project is ran you will be able to see a text called 'Button'
3.Just tap on the button then you will face the error which is in above screen shot
Snack, code example, screenshot, or link to a repository
Please find the reproducible demo here - -https://github.com/Yandamuri/Test-Hermes-In-IOS