-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Current implementation requires @babel/plugin-proposal-private-methods
plugin in RN Babel config, to be added to README
#6
Comments
Ogh... try to configure it as |
Thanks. Working now. |
Hi @birdofpreyru @b3rkaydem1r . |
@thanhnvpk01168 didn't it help to add the plugin, like you show in your screenshot? |
@birdofpreyru |
I'm not following, what do you mean? Fixing it in the library to not have adding the plugin to the host project? I guess can be done. |
@thanhnvpk01168 It was working when i add. But a few days later it's started not working. Same error. I am deleting the @babel/plugin-proposal-private-methods line but error is same. It doesnt work with flatlist. |
is it possible to disable @babel/plugin-proposal-private-methods library? @birdofpreyru |
I don't know. I was under impression it is still necessary to make private JS class members to work in RN. It makes no sense to get rid of private members in code, but maybe it can work already without this plugin. Needs investigation. |
Can you check? I'm stuck at this point. |
It is of very low priority for me. It works as is in my projects where I use the library. Also, in my understanding, the root problem is a bug in React Native or in the Babel plugin, as there is nothing wrong with using private class methods in the library. |
You can use SectionList from react native. @thanhnvpk01168 |
I had been try it, but still error |
Its have cache problem. Create new project then try on it. |
Hey, looking at @thanhnvpk01168's screenshot of Babel config above, I just now noticed that it is missing to also include "presets": ["module:metro-react-native-babel-preset"] without that line, Babel would only use a few plugins mentioned in the babel config, and would not apply the rest of Babel plugins RN relies on. Can it be the root problem you having to make the private methods work for you? |
@babel/plugin-proposal-private-methods
to your configuration.@babel/plugin-proposal-private-methods
plugin in RN Babel config, to be added to README
FYI: After yet another complaint about it (#9) I surrendered, and just released v0.6.0-alpha.4 which gets rid of the private class features for now. |
It is fixing when i add
@babel/plugin-proposal-private-methods
to babel file. But then i am getting an error for Flatlist.
The text was updated successfully, but these errors were encountered: