Skip to content

Function toString does not behave the same with hermes turned on #114

@Collin3

Description

@Collin3

I use react-native-qrcode and noticed that after upgrading the React Native v0.60 and turning on hermes, the QR code was broken. We debugged the issue and found that the problem comes when the library tries to stringify this renderCanvas function and then insert it into some HTML to show in the webview.

When calling .toString() on the function we found that we were actually getting

function renderCanvas(a0) { [ native code ] }

instead of getting a string of the actual function.

I realize this is probably not a very common use case, but figured I'd report it in case anyone else is seeing anything similar.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions