views.md

September 26, 2021 ยท View on GitHub

Views

List of available views:

View
MobileViewreturns children if detected device either mobile or tablet
BrowserViewreturns children if detected device is browser
TabletViewreturns children if detected device is tablet
AndroidViewreturns children if detected device os is android
IOSViewreturns children if detected device os is ios
IEViewreturns children if detected device name is Internet Explorer
WinPhoneViewreturns children if detected device os is windows phone
MobileOnlyViewreturns children if detected device is mobile
SmartTVViewreturns children if detected device is smarttv
ConsoleViewreturns children if detected device is console
WearableViewreturns children if detected device is wearable

There is also CustomView, which accepts prop condition - any boolean (e.g browserName === Chrome)

Each view accepts all common html properties, like className, children, styles, etc.

There is a few exceptions:

To render content in React.Fragment (instead of div), pass prop renderWithFragment (take into consideration, that in this case, other props won't work)