Search code examples
react-nativestylingvue-native

Does react-native/vue-native use device native styles?


I'm creating a vue native app but the input text looks like an input text on HTML. I thought vue-native would create a native input with native styles per device.
Do I forget something?

I found https://nativebase.io/ which seems to be the solution I need. Since I'm new on this native apps, is this library the way to implement native styles per device?


Solution

  • While react-native renders native views, it doesn't take native (platform and os-version-specific) styles to apply to them. These would look different on each platform and version of the device, and also be impossible to style from react-native. There are some components that look like native ones (e.g. Button, Switch) but they are also styled from react-native so that you can override any styles you want

    So yes, the only way to make react-native views look like native ones is to style them accordingly, and that's what libraries like nativebase do