Skip to content

Latest commit

 

History

History
30 lines (28 loc) · 533 Bytes

react-native.md

File metadata and controls

30 lines (28 loc) · 533 Bytes
id react-native
title React Native

Define styles in the render method and attach them to the JSX via inline styles:

class Game2048 extends React.Component {
  render() {
    const styles = reactCSS({
      'default': {
        container: {
          flex: 1,
          justifyContent: 'center',
          alignItems: 'center',
        },
      },
    })

    return (
      <View style={ styles.container }>
        <Board>
          { tiles }
        </Board>
        <GameEndOverlay />
      </View>
    )
  }
}