Need help with react-web?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

taofed
3.4K Stars 473 Forks Other 313 Commits 43 Opened issues

Description

A framework for building web apps with React Native compatible API.

Services available

!
?

Need anything else?

Contributors list

:warning: Use react-native-web instead.

react-web

React Web 中文 npm version

A library for building web apps with React Native compatible API.

Getting Started

Install

npm install --save react-web

Add Webpack configuration

Inside your webpack configuration, alias the

react-native
package to the
react-web
package:
// webpack.config.js

module.exports = { resolve: { alias: { 'react-native': 'react-web' } } }

Write your application with React Native API

import React, {Component} from 'react';
import {AppRegistry, StyleSheet, Text, View, Platform} from 'react-native';

class App extends Component { render() { return ( Hello, world! ); } }

const styles = StyleSheet.create({ box: {padding: 10}, text: {fontWeight: 'bold'} });

AppRegistry.registerComponent('App', () => App);

if (Platform.OS === 'web') { AppRegistry.runApplication('App', { rootTag: document.getElementById('app') }); }

React Native Compatible

  • ActivityIndicator
  • ART
  • Button
  • CheckBox
  • FlatList
  • Image
  • ImageBackground
  • KeyboardAvoidingView
  • ListView
  • Modal
  • Picker
  • ProgressBar
  • RefreshControl
  • SafeAreaView
  • ScrollView
  • SectionList
  • Slider
  • StatusBar
  • Switch
  • Text
  • TextInput
  • Touchable
  • TouchableHighlight
  • TouchableNativeFeedback
  • TouchableOpacity
  • TouchableWithoutFeedback
  • View
  • VirtualizedList
  • WebView
  • findNodeHandle
  • AccessibilityInfo
  • Alert
  • Animated
  • AppRegistry
  • AppState
  • AsyncStorage
  • BackHandler
  • Clipboard
  • Dimensions
  • Easing
  • Geolocation
  • I18nManager
  • InteractionManager
  • Keyboard
  • LayoutAnimation
  • Linking
  • NetInfo
  • PanResponder
  • PixelRatio
  • Platform
  • Settings
  • StyleSheet
  • UIManager
  • Vibration
  • processColor
  • NativeModules
  • ColorPropType
  • EdgeInsetsPropType
  • PointPropType
  • ViewPropTypes

Project Dependencies

License

React Web is BSD licensed.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.