Giter VIP home page Giter VIP logo

react-web's Introduction

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 (
      <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);

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

License

React Web is BSD licensed.

react-web's People

Contributors

yuanyan avatar yujiangshui avatar flyskywhy avatar mvayngrib avatar yawetse avatar huangzuizui avatar akecn avatar miracle2k avatar gre avatar fov42550564 avatar tiagojdferreira avatar cssivision avatar keeth avatar chenjun1011 avatar brainpoint avatar vmakhaev avatar kunkun12 avatar warmhug avatar wssgcg1213 avatar

Stargazers

Ruin avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.