We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I have an error on the BoardScreen screen which gives me this error: 'Check the render method of' BoardScreen ''
import React, { Component } from 'react'; import { StyleSheet, ScrollView, ActivityIndicator, View, Text } from 'react-native'; import { List, ListItem, Button, Icon } from 'react-native-elements'; import firebase from '../Firebase';
class BoardScreen extends Component { static navigationOptions = ({ navigation }) => { return { title: 'Board List', headerRight: ( <Button buttonStyle={{ padding: 0, backgroundColor: 'transparent' }} icon={{ name: 'add-circle', style: { marginRight: 0, fontSize: 28 } }} onPress={() => { navigation.push('AddBoard') }} /> ), }; }; constructor() { super(); this.ref = firebase.firestore().collection('boards'); this.unsubscribe = null; this.state = { isLoading: true, boards: [] }; } componentDidMount() { this.unsubscribe = this.ref.onSnapshot(this.onCollectionUpdate); } onCollectionUpdate = (querySnapshot) => { const boards = []; querySnapshot.forEach((doc) => { const { title, description, author } = doc.data(); boards.push({ key: doc.id, doc, // Documentos title, description, author, }); }); this.setState({ boards, isLoading: false, }); } render() { if(this.state.isLoading){ return( ) } return ( { this.state.boards.map((item, i) => ( <ListItem key={i} title={item.title} leftIcon={{name: 'book', type: 'font-awesome'}} onPress={() => { this.props.navigation.navigate('BoardDetails', { boardkey: ${JSON.stringify(item.key)}, }); }} /> )) } ); } }
${JSON.stringify(item.key)}
const styles = StyleSheet.create({ container: { flex: 1, paddingBottom: 22 }, item: { padding: 10, fontSize: 18, height: 44, }, activity: { position: 'absolute', left: 0, right: 0, top: 0, bottom: 0, alignItems: 'center', justifyContent: 'center' } })
export default BoardScreen;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello, I have an error on the BoardScreen screen which gives me this error: 'Check the render method of' BoardScreen ''
import React, { Component } from 'react';
import { StyleSheet, ScrollView, ActivityIndicator, View, Text } from 'react-native';
import { List, ListItem, Button, Icon } from 'react-native-elements';
import firebase from '../Firebase';
class BoardScreen extends Component {
static navigationOptions = ({ navigation }) => {
return {
title: 'Board List',
headerRight: (
<Button
buttonStyle={{ padding: 0, backgroundColor: 'transparent' }}
icon={{ name: 'add-circle', style: { marginRight: 0, fontSize: 28 } }}
onPress={() => { navigation.push('AddBoard') }}
/>
),
};
};
constructor() {
super();
this.ref = firebase.firestore().collection('boards');
this.unsubscribe = null;
this.state = {
isLoading: true,
boards: []
};
}
componentDidMount() {
this.unsubscribe = this.ref.onSnapshot(this.onCollectionUpdate);
}
onCollectionUpdate = (querySnapshot) => {
const boards = [];
querySnapshot.forEach((doc) => {
const { title, description, author } = doc.data();
boards.push({
key: doc.id,
doc, // Documentos
title,
description,
author,
});
});
this.setState({
boards,
isLoading: false,
});
}
render() {
if(this.state.isLoading){
return(
)
}
return (
{
this.state.boards.map((item, i) => (
<ListItem
key={i}
title={item.title}
leftIcon={{name: 'book', type: 'font-awesome'}}
onPress={() => {
this.props.navigation.navigate('BoardDetails', {
boardkey:
${JSON.stringify(item.key)}
,});
}}
/>
))
}
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
paddingBottom: 22
},
item: {
padding: 10,
fontSize: 18,
height: 44,
},
activity: {
position: 'absolute',
left: 0,
right: 0,
top: 0,
bottom: 0,
alignItems: 'center',
justifyContent: 'center'
}
})
export default BoardScreen;
The text was updated successfully, but these errors were encountered: