replace require with import
This commit is contained in:
@@ -6,9 +6,10 @@ import {
|
|||||||
TextInput,
|
TextInput,
|
||||||
FlatList
|
FlatList
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
|
console.log('first hi')
|
||||||
|
import * as styles from './styles'
|
||||||
|
import Datastore from 'react-native-local-mongodb'
|
||||||
|
|
||||||
const styles = require('./styles')
|
|
||||||
const Datastore = require('react-native-local-mongodb')
|
|
||||||
const db = new Datastore({ filename: 'asyncStorageKey', autoload: true })
|
const db = new Datastore({ filename: 'asyncStorageKey', autoload: true })
|
||||||
|
|
||||||
export default class drip extends Component {
|
export default class drip extends Component {
|
||||||
@@ -17,6 +18,7 @@ export default class drip extends Component {
|
|||||||
this.state = {
|
this.state = {
|
||||||
temperatures: []
|
temperatures: []
|
||||||
}
|
}
|
||||||
|
console.log('hello')
|
||||||
db.find({ key: { $exists: true } }, (err, persistedTemperatures) => {
|
db.find({ key: { $exists: true } }, (err, persistedTemperatures) => {
|
||||||
if (err) throw err
|
if (err) throw err
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|||||||
Generated
+1802
-1802
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
|||||||
const StyleSheet = require('react-native').StyleSheet
|
import { StyleSheet } from 'react-native'
|
||||||
module.exports = StyleSheet.create({
|
|
||||||
|
const ourStyle = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
@@ -11,3 +12,5 @@ module.exports = StyleSheet.create({
|
|||||||
margin: 10,
|
margin: 10,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
export { ourStyle }
|
||||||
|
|||||||
Reference in New Issue
Block a user