@reframe/react-native-web

0.3.2 • Public • Published

Reframe + React Native Web = ❤️

@reframe/react-native-web

Implement views for the web and for native mobile using React Native Web.

Usage

Add @reframe/react-native-web to your reframe.config.js:

module.exports = {
    $plugins: [
        require('@reframe/react-kit'),
        require('@reframe/react-native-web') // npm install @reframe/react-native-web
    ]
};

Example

// /plugins/react-native-web/example/reframe.config.js

module.exports = {
    $plugins: [
        require('@reframe/react-kit'),
        require('@reframe/react-native-web') // npm install @reframe/react-native-web
    ]
};
// /plugins/react-native-web/example/pages/hello-native-web.config.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,
};

Readme

Keywords

none

Package Sidebar

Install

npm i @reframe/react-native-web

Weekly Downloads

0

Version

0.3.2

License

none

Unpacked Size

7.14 kB

Total Files

9

Last publish

Collaborators

  • brillout