vitalets / react-native-extended-stylesheet

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

Hi I have installes `EStyleSheet @^0.9.0` using yarn #95

Closed alvaroTech911 closed 5 years ago

alvaroTech911 commented 6 years ago

Steps to Reproduce

  1. I installed the module using yarn
  2. Imported it into my component
  3. I created my styles like I would using Stylesheet.create but replacing it with EStyleSheet but none of my style rules apply.

Show the code

// @flow

import React, { PureComponent } from 'react';
import { StatusBar, View } from 'react-native';
import EStyleSheet from 'react-native-extended-stylesheet';
import { Tiles } from './src/components';

const TAGS = [
  '#love',
  '#instagood',
  '#photooftheday',
  '#beautiful',
  '#fashion',
];

const styles = EStyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#2196F3',
  },
  header: {
    marginHorizontal: 20,
    marginVertical: 50,
  },
  title: {
    fontSize: 22,
    fontWeight: 'bold',
    marginBottom: 10,
  },
  text: {
    color: '#FFFFFF',
    fontSize: 16,
    textAlign: 'center',
  },
});

export default class Main extends PureComponent {
  // Reference Tiles component
  _tilesComponent: ?Tiles;

  render() {
    return (
      <View style={styles.container}>
        <StatusBar hidden />
        <Tiles ref={component => (this._tilesComponent = component)} tiles={TAGS} />
      </View>
    );
  }
}

Environment

React Native Environment Info: System: OS: macOS High Sierra 10.13.6 CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz Memory: 24.00 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 8.11.2 - /usr/local/bin/node Yarn: 1.9.4 - /usr/local/bin/yarn npm: 6.4.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3 Android SDK: Build Tools: 23.0.1, 27.0.3, 28.0.0, 28.0.1 API Levels: 23, 26, 27, 28 IDEs: Android Studio: 3.1 AI-173.4819257 Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild npmPackages: react: 16.4.1 => 16.4.1 react-native: 0.56.1 => 0.56.1 npmGlobalPackages: create-react-native-app: 1.0.0 react-native-cli: 2.0.1

vitalets commented 6 years ago

Have you called EStyleSheet.build()?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.