Skip to content

React Native - Class private methods are not enabled #4309

Answered by Overtorment
Overtorment asked this question in Q&A
Discussion options

You must be logged in to vote

forgot to mention, react-native version 0.71.10
metro-react-native-babel-preset version 0.73.9 (not sure if its important)

after adding babel plugin this is the issue I was having:

I was able to use solution provided here: #3996 (comment)
(added override to babel plugin)

    overrides: [
      {
        test: './node_modules/ethers',
        plugins: [
          ["@babel/plugin-transform-private-methods", { "loose": true }]
        ]
      }
    ]

Replies: 6 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@ateeq4112
Comment options

@sonugk
Comment options

Answer selected by ricmoo
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Kristiyandz
Comment options

@pablo4lvarez
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@OskarEichler
Comment options

@kaylee182000
Comment options

@OskarEichler
Comment options

@kaylee182000
Comment options

@OskarEichler
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
10 participants
Converted from issue

This discussion was converted from issue #4307 on August 10, 2023 17:57.