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

Fixes Invalid directory Users/Node_modules/Dimensions #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jasecoop
Copy link

This fixes the issue found here #4 (comment)

@AlexGustafsson
Copy link

+1

@tuneZola
Copy link

+1, I kind of need this also

@AndrewSB
Copy link

+1 lets get this merged and on npm

@taisyo7333
Copy link

+1

@jmacioszek
Copy link

Need this as well 👍

@tuneZola
Copy link

@Jotem If i where you I would just fork it or make your own util file with this functionality and add it to your project. This project has not been touched for a long time.

@jmacioszek
Copy link

Already did that, thanks anyway ;)

@paintedbicycle
Copy link

This library still works fine - just need to merge in this PR

@PutintsevSergii
Copy link

v 0.05 with RN 53 - have a crash

@enieber
Copy link

enieber commented Jul 11, 2018

I maked fork for maintain this project
https://github.com/enieber/react-native-viewport-units

@rahamin1
Copy link

It is also possible to create a single .js file with the following:

import { Dimensions } from 'react-native';

export const width = Dimensions.get('window').width;
export const height = Dimensions.get('window').height;

// vw/vh are 1% of the screen width/height respectively
export const vw = width / 100;
export const vh = height / 100;

export const vmin = Math.min(vw, vh);
export const vmax = Math.max(vw, vh);

@ixuz
Copy link

ixuz commented Apr 4, 2020

+1 fix works for me

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 this pull request may close these issues.