Fix some warnings in benchmark app from RN upgrade

This commit is contained in:
Scott Kyle 2016-05-16 13:21:55 -07:00
parent d29a6498dc
commit e304cd0032
3 changed files with 48 additions and 17 deletions

View File

@ -17,7 +17,8 @@
////////////////////////////////////////////////////////////////////////////
'use strict';
import React, {
import {
AppRegistry,
Component,
StyleSheet,
@ -27,9 +28,9 @@ import React, {
TouchableHighlight
} from 'react-native';
const Store = require('react-native-store');
const SQLite = require('react-native-sqlite-storage');
const Realm = require('realm');
import Store from 'react-native-store';
import SQLite from 'react-native-sqlite-storage';
import Realm from 'realm';
// Make SQLite module use Promises.
SQLite.enablePromise(true);
@ -353,7 +354,7 @@ class RNSqliteTests extends Tests {
const apiTests = [new RealmTests, new RNSqliteTests, new RNStoreTests];
class ReactNativeBenchmarks extends Component {
export default class ReactNativeBenchmarks extends Component {
constructor(props) {
super(props);
@ -497,5 +498,3 @@ const styles = StyleSheet.create({
fontSize: 12
}
});
module.exports = ReactNativeBenchmarks;

View File

@ -1,8 +1,24 @@
////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////
'use strict';
import React, {
AppRegistry
} from 'react-native';
const ReactNativeBenchmarks = require('./benchmarks');
import { AppRegistry } from 'react-native';
import ReactNativeBenchmarks from './benchmarks';
AppRegistry.registerComponent('ReactNativeBenchmarks', () => ReactNativeBenchmarks);
AppRegistry.registerComponent('ReactNativeBenchmarks', () => ReactNativeBenchmarks);

View File

@ -1,8 +1,24 @@
'use strict';
import React, {
AppRegistry
} from 'react-native';
////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////
const ReactNativeBenchmarks = require('./benchmarks');
'use strict';
import { AppRegistry } from 'react-native';
import ReactNativeBenchmarks from './benchmarks';
AppRegistry.registerComponent('ReactNativeBenchmarks', () => ReactNativeBenchmarks);