A magical & easy method for responsive fontSize based on screen width to support all size devices.
npm install rn-responsive-fontyarn add rn-responsive-font
npm install rn-responsive-font --save
``
import React, {Component} from 'react';
import { Text, View } from 'react-native';
import resp from "rn-responsive-font";
class App extends Component {
render() {
return
My App fits all screen
}
}
const styles = {
container: {
flex: 1,
justifyContent: "center",
alignItems: "center"
},
text: {
// I want idle size to be 20
fontSize: resp(20)
}
}
``
>It supports both the platforms Android & iOS