Giter Site home page Giter Site logo

react-native-viewport's People

Contributors

markburns avatar pjjanak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-native-viewport's Issues

Missing RCT_EXPORT_MODULE()

Hi and thanks for creating this module. I initially received a warning when trying to run my app with the Viewport install, it said that Viewport was not exported and did I forget to use RCT_EXPORT_MODULE()? I have added it as follows in Viewport.m and all seems to work. Is this correct?

...

@implementation Viewport
{
  NSDictionary *_lastKnownDimensions;
}

RCT_EXPORT_MODULE()

...

General question about use

Thanks for creating this library.

Am curious about how to implement it for (what I would guess) is a common use-case: many components that change based on orientation and/or device size.

Image of game

or

Image of tile-list

There are cases where we would want many components to update autonomously (ex: width,height,placement,etc) relative to screen size/orientation.

Should components that all need viewport information subscribe to viewport events independently? Seems like potentially a lot of subscriptions.

Thanks in advance

Cant load the module

I cant load the module and I followed all steps very carefully.

Launching Dev Tools...
Unable to resolve module ./base64-vlq from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./util from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./array-set from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./base64 from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./util from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./util from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./binary-search from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./array-set from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./base64-vlq from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./source-map-generator from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./util from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module source-map/source-map-consumer from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module source-map/source-map-generator from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module source-map/source-node from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module RCTDeviceEventEmitter from /Users/hello/Apps/Food/node_modules/react-native-viewport/Viewport.ios.js
Unable to resolve module NativeModules from /Users/hello/Apps/Food/node_modules/react-native-viewport/Viewport.ios.js
Unable to resolve module invariant from /Users/hello/Apps/Food/node_modules/react-native-viewport/Viewport.ios.js
Unable to resolve module ./base64-vlq from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./util from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./array-set from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./base64 from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js
Unable to resolve module ./util from /Users/hello/Apps/Food/node_modules/react-native-viewport/node_modules/react-native/Libraries/JavaScriptAppEngine/Initialization/SourceMap.js

callback not always fired, or not accurate

Hey Peter. Nice lib and great installation instructions!

I'm using iOS 8.3. iOS Simulator. On device rotations, it seems to work reliably with iPhone 6 and iPhone 6plus, but with other devices the callback isn't either reliably fired, or it's sent with the wrong dimension info (e.g. landscape dimensions sent when in Portrait, or portrait dimensions sent when in Landscape).

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.