Nicolas Gallagher e6811b2134 [fix] ResponderEventPlugin: touch or mouse dependencies
**Problem**

Browsers tend to fire both touch and mouse events when touch is
supported. This causes touchables to fire responder callbacks twice.
For example, 'TouchableOpacity' will animate the opacity twice in
response to a touch.

**Response**

If a browser supports touch, don't include the mouse events as
dependencies of the responder events. This is not ideal, as some devices
support both touch and mouse interactions. This will need to be
revisited.
2016-03-15 13:19:43 -07:00
2016-02-18 23:03:59 -08:00
2016-03-08 09:40:28 -08:00
2015-06-09 12:24:08 -07:00
2016-02-16 23:43:41 -08:00
2016-02-16 23:43:41 -08:00
2016-02-16 23:43:41 -08:00
2016-03-12 08:00:02 -08:00
2016-03-12 08:00:02 -08:00

React Native for Web

Build Status npm version gzipped size

React Native components and APIs for the Web.

Browser support: Chrome, Firefox, Safari >= 7, IE 10, Edge.

Quick start

To install in your app:

npm install --save react@0.14 react-dom@0.14 react-native-web

Read the Client and Server rendering guide.

Overview

This is a web implementation of React Native components and APIs. The React Native components are good web application building blocks, and provide a common foundation for component libraries.

For example, the View component makes it easy to build common layouts with flexbox, such as stacked and nested boxes with margin and padding. And the StyleSheet API converts styles defined in JavaScript to "atomic" CSS.

Examples

Demos:

Example:

import React, { AppRegistry, Image, StyleSheet, Text, View } from 'react-native'

// Components
const Card = ({ children }) => <View style={styles.card}>{children}</View>
const Title = ({ children }) => <Text style={styles.title}>{children}</Text>
const Photo = ({ uri }) => <Image source={{ uri }} style={styles.image} />
const App = () => (
  <Card>
    <Title>App Card</Title>
    <Photo uri="/some-photo.jpg" />
  </Card>
)

// App registration and rendering
AppRegistry.registerComponent('MyApp', () => App)
AppRegistry.runApplication('MyApp', { rootTag: document.getElementById('react-root') })

// Styles
const styles = StyleSheet.create({
  card: {
    flexGrow: 1,
    justifyContent: 'center'
  },
  title: {
    fontSize: '1.25rem',
    fontWeight: 'bold'
  },
  image: {
    height: 40,
    marginVertical: 10,
    width: 40
  }
})

Documentation

Guides:

Exported modules:

License

React Native for Web is BSD licensed.

Description
No description provided
Readme MIT 24 MiB
Languages
JavaScript 99.7%
HTML 0.2%