Is there a way in React Native that I can put all of my styles in a single file so it can easily be maintained (from my perspective) like in HTML we have a .css
fil
This works for me on the latest React:
I have my stylesheet named CoolTextStyle.js (which is in the same directory as my index.ios.js). And it turns out you dont even need the 'StyleSheet' class
module.exports =
{
borderRadius:5
});
Then in index.ios.js
import React, { Component, PropTypes } from 'react';
import { View, Text, TextInput,TouchableHighlight,StatusBar } from 'react-native';
var cool_text_style = require('./CoolTextStyle');
export default class delme extends Component
{
render()
{
return (
Login
)
}
}
AppRegistry.registerComponent('delme', () => delme);