Skip to content
This repository has been archived by the owner on Sep 13, 2020. It is now read-only.

New Packager config for accessing react-native internal modules. #64

Closed
alinz opened this issue Jul 6, 2015 · 5 comments
Closed

New Packager config for accessing react-native internal modules. #64

alinz opened this issue Jul 6, 2015 · 5 comments

Comments

@alinz
Copy link
Contributor

alinz commented Jul 6, 2015

ok, I think we need to change couple of things and I want to know your (@Kureev) opinion about it.
based on this ticket, facebook/react-native#1808, we should change some code as follows:

instead of this:

var deviceScreen = require('Dimensions').get('window');

we should do it this way

var { Dimensions } = require('react-native');
var deviceScreen = Dimensions.get('window');

if you don't do it you will get this annoying error from packager.

Unable to resolve module Dimensions ...

what do you think? I really liked the idea of @providesModule in comment which makes it a lot easier to find a module. It seems that this feature will be removed. I don't know for sure.

@alinz
Copy link
Contributor Author

alinz commented Jul 7, 2015

I will close this issue since, it's no longer needed. They keep changing it.

@alinz alinz closed this as completed Jul 7, 2015
@Kureev
Copy link
Owner

Kureev commented Jul 7, 2015

Lol, it becomes complicated to close issues before they becomes deprecated :D

@alinz
Copy link
Contributor Author

alinz commented Jul 7, 2015

@Kureev this is not a slide-menu's issue. They keep changing the packager which makes it a lot harder to update my project. Any how, as soon as you are using Dimensions inside any projects, you will get packager warning. That warning is just an annoying thing that does nothing. So I think it is safe to ignore it until they fix the packager.

@Kureev
Copy link
Owner

Kureev commented Jul 7, 2015

No probs, when it's gonna be stable I'll fix it according confirmed spec

@piyushchauhan2011
Copy link
Contributor

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants