0.5.13 • Published 3 years ago
@goldpage/react-native-web v0.5.13
Goldpage + React Native Web = :heart:
@goldpage/react-native-web
Use Goldpage with React Native Web.
Usage
Install @goldpage/react-native-web
.
$ npm install @goldpage/react-native-web
The plugin is automatically loaded and
the view
property of your page configs is now rendered with React Native Web.
Example
// ./example/pages/hello-native-web.page.js
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
class App extends React.Component {
render() {
return (
<View style={styles.box}>
<Text style={styles.text}>Hello from native web!</Text>
</View>
);
}
}
const styles = StyleSheet.create({
box: { padding: 10 },
text: { fontWeight: 'bold', color: 'green' },
});
export default {
route: '/',
view: App,
//renderToDom: false,
renderToHtml: true,
};