react-native-viewport-units icon indicating copy to clipboard operation
react-native-viewport-units copied to clipboard

Fixes Invalid directory Users/Node_modules/Dimensions

Open jasecoop opened this issue 9 years ago • 12 comments

This fixes the issue found here https://github.com/jmstout/react-native-viewport-units/issues/4#issuecomment-157808000

jasecoop avatar Nov 18 '15 18:11 jasecoop

+1

AlexGustafsson avatar Dec 10 '15 22:12 AlexGustafsson

+1, I kind of need this also

tuneZola avatar Dec 15 '15 00:12 tuneZola

+1 lets get this merged and on npm

AndrewSB avatar Dec 29 '15 20:12 AndrewSB

+1

taisyo7333 avatar May 25 '16 02:05 taisyo7333

Need this as well 👍

jmacioszek avatar Oct 31 '16 17:10 jmacioszek

@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.

tuneZola avatar Oct 31 '16 19:10 tuneZola

Already did that, thanks anyway ;)

jmacioszek avatar Nov 02 '16 11:11 jmacioszek

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

paintedbicycle avatar Mar 21 '18 15:03 paintedbicycle

v 0.05 with RN 53 - have a crash

PutintsevSergii avatar Jun 11 '18 13:06 PutintsevSergii

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

enieber avatar Jul 11 '18 17:07 enieber

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);

rahamin1 avatar Dec 27 '18 18:12 rahamin1

+1 fix works for me

ixuz avatar Apr 04 '20 10:04 ixuz