vitalets / react-native-extended-stylesheet

Extended StyleSheets for React Native
MIT License
2.93k stars 132 forks source link

Not working with RN 0.61+ both on Android and IOS #125

Closed carl0804 closed 4 years ago

carl0804 commented 4 years ago

Environment

I changed fontSize from 1 rem to 10 rem, and changed color, but nothing changed on my Android and IOS simulator.

MyCode:

import React, {Component} from 'react';
import {Text, View} from 'react-native';
import EStyleSheet from 'react-native-extended-stylesheet';
const styles = EStyleSheet.create({
  text: {
    fontSize: '2rem',
    color: 'red',
  },
});
export class App extends Component {
  render() {
    return (
      <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
        <Text style={styles.text}> Hello react native </Text>
      </View>
    );
  }
}

export default App;

Dependencies:

"dependencies": {
    "react": "16.9.0",
    "react-native": "0.61.5",
    "react-native-extended-stylesheet": "^0.12.0"
  },

Mac os: 10.15.1

carl0804 commented 4 years ago

Sorry, I forget to build first.