-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Export react-native-device-info to be compatible with destructured ES6 imports #727
Export react-native-device-info to be compatible with destructured ES6 imports #727
Conversation
I like the idea but I wish this didn't add essentially a duplicate entry for each function. Is there any way (breaking or non-breaking) to do this without duplicating each function entry? Just trying to keep the barrier as low as possible for people that propose PRs - we already have like 5 things we ask people to do :-) |
Yeah, I got your point, but unfortunately, this is the only way I found to implement destructured ES6 imports! |
ok - I will likely merge but I want to think on it just a bit more by looking at other modules to see how they did it (usually I examine react-native-community/netinfo) - maybe there's nothing to be done but maybe there's an organizational trick I/we could use |
Yes absolutely, That is exactly what I did, I checked how |
Man, I guess it's just verbose then. Some things javascript is great at. Some things, not so much...module systems... 🤷♂️ |
Yes exactly, I removed duplicate function implementation, so now contributor can add function to be exported :
then add it to default export :
|
Thanks for your patience! Big refactor and release coming up as a v3, this will be in it |
Description
Fixed issue #723
Checklist
README.md
CHANGELOG.md
deviceinfo.d.ts
,deviceinfo.js.flow
)default/index.js
)example/App.js
)