This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { View } from 'react-native'; | |
| const FixedDimensionsBasics = () => ( | |
| <View> | |
| <View style={{ width: 50, height: 50, backgroundColor: 'powderblue' }} /> | |
| <View style={{ width: 100, height: 100, backgroundColor: 'skyblue' }} /> | |
| <View style={{ width: 150, height: 150, backgroundColor: 'steelblue' }} /> | |
| </View> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { Text } from 'react-native'; | |
| const HelloWorld = () => ( | |
| <Text>Hello world!</Text> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { View } from 'react-native'; | |
| const FlexDirectionBasics = () => ( | |
| <View style={{ flex: 1, flexDirection: 'row' }}> | |
| <View style={{ width: 50, height: 50, backgroundColor: 'powderblue' }} /> | |
| <View style={{ width: 50, height: 50, backgroundColor: 'skyblue' }} /> | |
| <View style={{ width: 50, height: 50, backgroundColor: 'steelblue' }} /> | |
| </View> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { AppRegistry, Text } from 'react-native'; | |
| import HelloWorld from './HelloWorld'; | |
| AppRegistry.registerComponent('HelloWorldApp', () => HelloWorld); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { TextInput } from 'react-native'; | |
| class UselessTextInput extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { text: 'Useless Placeholder' }; | |
| } | |
| render() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> | |
| <title>React App</title> | |
| </head> | |
| <body> | |
| <div id="root"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import logo from './logo.svg'; | |
| import './App.css'; | |
| class App extends Component { | |
| render() { | |
| return ( | |
| <div className="App"> | |
| <div className="App-header"> | |
| <img src={logo} className="App-logo" alt="logo" /> |