-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.web.js
More file actions
32 lines (26 loc) · 930 Bytes
/
index.web.js
File metadata and controls
32 lines (26 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// index.web.js
import React, { Component } from 'react';
// const React = require('react');
// const AppRegistry = require('reat-native').AppRegistry;
// const StyleSheet = require('reat-native').StyleSheet;
// const Text = require('reat-native').Text;
// const View = require('reat-native').View;
import { AppRegistry, StyleSheet, Text, View } from 'react-native';
import js from './index.js';
console.log('rustttt: ', js);
class App extends Component {
render() {
return (
<View style={styles.box}>
<Text style={styles.text}>Hello, world!</Text>
</View>
);
}
}
const styles = StyleSheet.create({
box: { padding: 10 },
text: { fontWeight: 'bold' }
});
AppRegistry.registerComponent('App', () => App);
AppRegistry.runApplication('App', { rootTag: document.getElementById('react-root') });
// ./node_modules/.bin/webpack-dev-server -d --config ./webpack.config.js --inline --hot --colors