react-native-device-detection
react-native-device-detection copied to clipboard
function maybe better than class
hi @m0ngr31 thanks for your great work.
but you know, when somebody use react-native-web, like me, hope detect the device type when resize window. so, a function, check current screen/window size , maybe better than now, only check once when init the library.
Even in react-native, if the device changes orientation, width and height do not update. Dimensions have an addEventListener method that fires every time a property of "window" or "screen" changes. It could be used to guarantee that width and height are always correct.
I just wrote a proof of concept: #14
Let me know if you think that'd work.