Skip to content

Commit 0367d98

Browse files
committed
require [email protected] and react-360
1 parent b58d634 commit 0367d98

File tree

3 files changed

+11
-23
lines changed

3 files changed

+11
-23
lines changed

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ You will also need to install the targets you want to support:
2424
```
2525
- vr:
2626
```sh
27-
npm install --save react-vr
27+
npm install --save react-360
2828
```
2929
- Windows:
3030
```sh
@@ -34,25 +34,21 @@ You will also need to install the targets you want to support:
3434
### Usage
3535

3636
```jsx
37-
import React from 'react';
38-
import { View, Text, Image, StyleSheet } from 'react-primitives';
37+
import React from "react";
38+
import { View, Text, Image, StyleSheet } from "react-primitives";
3939

4040
class Foo extends React.Component {
4141
render() {
42-
return (
43-
<View style={styles.foo}>
44-
{this.props.children}
45-
</View>
46-
);
42+
return <View style={styles.foo}>{this.props.children}</View>;
4743
}
4844
}
4945

5046
const styles = StyleSheet.create({
5147
foo: {
5248
width: 100,
5349
height: 100,
54-
backgroundColor: '#ff00ff',
55-
},
50+
backgroundColor: "#ff00ff"
51+
}
5652
});
5753
```
5854

@@ -81,7 +77,6 @@ The exported APIs thus far are:
8177

8278
In the future, a `TextInput` component may also be added.
8379

84-
8580
## Props where props are due
8681

8782
This library was largely inspired from the work done by [Nicolas Gallager](https://github.com/necolas)

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-primitives",
3-
"version": "0.7.1",
3+
"version": "0.8.0",
44
"description": "Primitive React Interfaces Across Targets",
55
"main": "index.js",
66
"scripts": {
@@ -61,13 +61,13 @@
6161
"octonode": "^0.7.7",
6262
"phantomjs-prebuilt": "^2.1.7",
6363
"react": "^16.5.2",
64+
"react-360": "^1.1.0",
6465
"react-art": "^16.5.2",
6566
"react-dom": "^16.5.2",
6667
"react-native": "^0.52.0",
67-
"react-native-web": "^0.9.0",
68+
"react-native-web": "^0.11.0",
6869
"react-sketchapp": "^2.0.0",
6970
"react-test-renderer": "^16.4.0",
70-
"react-vr": "^2.0.0",
7171
"watchify": "^3.7.0",
7272
"webpack": "^4.12.0",
7373
"webpack-cli": "^3.0.3"
@@ -82,6 +82,6 @@
8282
"react": ">=16.5.1",
8383
"react-art": ">=16.5.1",
8484
"react-dom": ">=16.5.1",
85-
"react-native-web": ">=0.9.0"
85+
"react-native-web": ">=0.11.0"
8686
}
8787
}

src/injection/react-native-web.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,7 @@ function getDefault(m) {
1717
return m.__esModule === true ? m.default : m;
1818
}
1919

20-
let StyleRegistry = null;
21-
/* eslint-disable import/no-unresolved */
22-
try {
23-
StyleRegistry = getDefault(require('react-native-web/dist/cjs/exports/StyleSheet/createStyleResolver'))();
24-
} catch (e) {
25-
StyleRegistry = getDefault(require('react-native-web/dist/cjs/exports/StyleSheet/ReactNativeStyleResolver'));
26-
}
27-
/* eslint-enable */
20+
const StyleRegistry = getDefault(require('react-native-web/dist/cjs/exports/StyleSheet/createStyleResolver'))();
2821

2922
const emptyObject = {};
3023

0 commit comments

Comments
 (0)