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

[Feature Request] Support RN Hermes Engine #3935

Open
1 task done
StarHosea opened this issue Aug 17, 2023 · 2 comments · May be fixed by #3955
Open
1 task done

[Feature Request] Support RN Hermes Engine #3935

StarHosea opened this issue Aug 17, 2023 · 2 comments · May be fixed by #3955

Comments

@StarHosea
Copy link

StarHosea commented Aug 17, 2023

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

hermes will not support with operator which used in json-schema expression compiler .
hermes language feature excluded from support

What does the proposed API look like?

replace compiler with operator like this

const Registry = {
  silent: false,
  compile(expression: string, scope = {}) {
 // insert $root before expression vars
   expression = expression.replaceAll(/(\$\w+)/g, '$root.$1');
    if (Registry.silent) {
      try {
        return new Function('$root', ` return (${expression}); `)(
          scope
        )
      } catch {}
    } else {
      return new Function('$root', `return (${expression}); `)(
        scope
      )
    }
  },
}

another change should be the custom scope,

@mrsquhuainan
Copy link

希望赶快修复吧,我们也是有这个问题

@cc20140820
Copy link

同上,升级rn到 0.70后默认开启Hermes引擎,不再支持【with】操作符,导致formily无法工作

This was referenced Sep 2, 2023
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

Successfully merging a pull request may close this issue.

3 participants